-
Notifications
You must be signed in to change notification settings - Fork 1
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
Added a JSON schema for telefonistka.yaml files #73
Conversation
We can ignore the CI failure - there's some unrelated bug that fails the docker build from forks |
schema/telefonistka.json
Outdated
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"$id": "https://json.schemastore.org/telefonistka.json", | ||
"title": "Schema for telefonistka.yaml files", |
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.
"title": "Schema for telefonistka.yaml files", | |
"title": "Schema for repo-level telefonistka.yaml files", |
We have two kinds of telefonistka.yaml files, repo-level that is placed in the repo root directory and a component-level one, and that one has a different scheme.
We don't need to include the component-level scheme in this PR but we should name it in a way that support a later addition
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.
oh, maybe also change the id field
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.
I can add the component-level elements in the schema, but the completion might be confusing because it will show all available elements.
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.
I thought we'll add a seperate scheme in a separate file
and the # yaml-language-server: $schema=
URL will point to different file for each type.
But I've never used a json scheme so I'm not sure exactly how it works
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.
If you're using the YAML plugin for VS Code it will automatically pull the matching schema for the file from http://www.schemastore.org/json/. We might want to make a PR to https://github.com/SchemaStore/schemastore later.
For now, we can use # yaml-language-server: $schema
URL pointing to the raw schema JSON.
After merging this I will make a PR on https://github.com/SchemaStore/schemastore. |
Description
Added a JSON schema for completion in editors.
Part of https://commercetools.atlassian.net/browse/ENE-104
Type of Change
Notes
Completions should work in editors, provided you specify this schema. Here are some docs on how to do that:
If you're using vim or emacs you can RTFM :-)