-
Notifications
You must be signed in to change notification settings - Fork 316
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
Add JSON Schema for package configuration #5370
Add JSON Schema for package configuration #5370
Conversation
"oneOf": [ | ||
{ | ||
"required": [ | ||
"vcs" | ||
] | ||
}, | ||
{ | ||
"required": [ | ||
"source_artifact_url" | ||
] | ||
} | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: this should be correct according to the JSON Schema spec, but vscode-yaml plugin currently does not correctly handle it. The plugin does not produce error if both vcs
and source_artifact_url
are provided.
LGTM, but maybe @MarcelBochtler can chime in as he's got the most experience here. Also, can we submit this to a schema registry, too? |
That would be great! |
I tested it and it works great :) |
I also hoped that it would be possible to use this package-configuration schema and somehow include it as a reference in the |
Signed-off-by: Mikko Murto <mikko.murto@hhpartners.fi>
9ccf2ee
to
84179f6
Compare
I haven't tried it myself, but according to this, it should be possible to refer to schema from inside of another. |
Codecov Report
@@ Coverage Diff @@
## main #5370 +/- ##
=========================================
Coverage 72.14% 72.14%
Complexity 1982 1982
=========================================
Files 264 264
Lines 13979 13979
Branches 1988 1988
=========================================
Hits 10085 10085
Misses 2832 2832
Partials 1062 1062 Continue to review full report at Codecov.
|
Add a JSON Schema for package configuration for IDE validation.
Can be tested with VSCode by adding the following in
.vscode/settings.json
of a workspace containing package configurations and copying the schema toschemas/package-configuration-schema.json
of the workspace: