mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 16:15:49 -06:00
[PR #3757] [CLOSED] feat: allow dumping of configuration JSON Schema #4824
Labels
No labels
In Progress
WIP
WaitingForInfo
bug
doc
duplicate
easy
enhancement
future
help wanted
invalid
lifecycle/stale
need-issue-template
need-usage-help
no plan
proposal
pull-request
question
todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/frp#4824
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/fatedier/frp/pull/3757
Author: @akx
Created: 11/8/2023
Status: ❌ Closed
Base:
dev← Head:schema📝 Commits (1)
597b506feat: allow dumping of configuration JSON Schema📊 Changes
5 files changed (+79 additions, -5 deletions)
View changed files
📝
cmd/frpc/sub/root.go(+11 -3)📝
cmd/frps/root.go(+10 -2)📝
go.mod(+5 -0)📝
go.sum(+11 -0)➕
pkg/util/util/cli.go(+42 -0)📄 Description
Summary
🤖 Generated by Copilot at 657e592
Add a feature to dump the JSON schema of the client and server configuration to stdout. This feature uses the
reflectandutilpackages and introduces new flags to thefrpcandfrpscommands. It also adds new dependencies to thego.modfile.WHY
For software that needs to generate frp configuration programmatically, it's useful to be able to validate the generated configuration before passing it to frp.
That software can now do
./frpc --json_schema > frpc.config.jsonand use their favorite JSON Schema validator from there on out.For instance, the generated client configuration schema looks like this: https://gist.github.com/akx/5c1a605e2624ee75131b4a684f235a82
Powered by https://github.com/invopop/jsonschema (❤️)
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.