-
-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] Generate json schema for registry from Go structs #623
Comments
It is kind in registry to add parameter than adding custom templates. |
Thank you for your proposal. I use JSON Schema in the other project and I think it's useful.
In the project, I maintain JSON Schema manually, but it's useful to generate JSON Schema from Go. |
|
Unfortunately, json-schema-for-humans doesn't support JSON Schema 2020-12. |
I've manually generated and uploaded JSON Schema to GitHub Pages. |
Hmm... |
I've removed the repository aquaproj/json-schema. |
I found a bug with JSON Schema. 🙂 |
Schema looks nice. Linting works correctly on my editor. However I have one suggest. |
Thank you for your feedback. https://pkg.go.dev/runtime#pkg-constants
$ go tool dist list
|
GOOS$ go tool dist list | xargs dirname | sort -u
aix
android
darwin
dragonfly
freebsd
illumos
ios
js
linux
netbsd
openbsd
plan9
solaris
windows GOARCH$ go tool dist list | xargs basename | sort -u
386
amd64
arm
arm64
mips
mips64
mips64le
mipsle
ppc64
ppc64le
riscv64
s390x
wasm |
TODO: |
Test standard registry with JSON Schema. aquaproj/aqua-registry#2779 |
Feature Overview
Generate json schema to validate registry files.
Why is the feature needed?
We can write registry with in yaml. It is declarative, but writing correctly has been difficult a bit lately. I want help of editor.
I suggest to give out json schema. It defines structure of json-like lanuage (yaml or toml), and it can be used by language server. It is useful for completion or linting, so we can develop registry more easily.
Also, generated schema should be served on the website (https://aquaproj.github.io is suitable)
Ready-made projects to do that:
Does the feature include Breaking Changes?
No.
Example Code
The text was updated successfully, but these errors were encountered: