-
-
Notifications
You must be signed in to change notification settings - Fork 964
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 the config schema to schemastore.org #590
Comments
The versioning strategy of schemastore.org is to just postfix the file with the version number and load the burden of deciding which version to use to the editor (e.g. by examining the environment). As this will clearly not work with our config files my proposal is to add a top level version key that currently only is used for validation. Kratos will use a config file although the version does not match but spit out a warning. This key will be required then. Further we can write a "version meta" schema that uses |
@zepatrik In a JSON schema, a $ref keyword is a JSON Pointer to a schema, or a type or property in a schema. A JSON pointer takes the form of A # B in which: A is the relative path from the current schema to a target schema. ... B is the complete path from the root of the schema to a type or property in the schema. (http://niem.github.io/json/reference/json-schema/references/) In addition, schemas may be combined with the following keywords: It would then work similar to https://json.schemastore.org/circleciconfig There is also a relative pointers under discussion in ietf (https://datatracker.ietf.org/doc/draft-handrews-relative-json-pointer/) Regarding the question of adding this to IDE, in VS CODE there are several possibilities. See the following Mapping in the JSON# { |
Is your feature request related to a problem? Please describe.
schemastore.org provides json schemas via an API for editors like VSCode and JetBrains to offer code completion, validation and more. If we add our config.schema.json our users get editor support for config files.
Describe the solution you'd like
We can easily submit a PR to add our schema. One problem I see is that the config file per default is called
config.yml
which is not descriptive enough. We should rather change the default file name to bekratos.yml
so we can add the pattern.Describe alternatives you've considered
Add the schema but keep the default
config.yml
. This would result in most of the users not benefiting from the feature as they probably use the default file name.Additional context
It is important to figure out how they do versioning of schemas, especially for us as it changes quite often.
The text was updated successfully, but these errors were encountered: