Skip to content
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

ENHS example does not follow ENHS schema #41

Closed
larshp opened this issue Apr 6, 2021 · 4 comments · Fixed by #52
Closed

ENHS example does not follow ENHS schema #41

larshp opened this issue Apr 6, 2021 · 4 comments · Fixed by #52
Assignees
Labels
bug Something isn't working

Comments

@larshp
Copy link
Collaborator

larshp commented Apr 6, 2021

boolean values should be false instead of "false"

plus property fallbackClass missing

image

@schneidermic0 schneidermic0 added the bug Something isn't working label Apr 6, 2021
@schneidermic0
Copy link
Contributor

From my point of view fallbackClass shall not be marked mandatory in the schema.

@huber-nicolas
Copy link
Contributor

From my point of view fallbackClass shall not be marked mandatory in the schema.

The schema says:
"if": {
"useFallbackClass": {
"const": "true"
}
},
"then": {
"required": [
"fallbackClass"
]
},

@larshp
Copy link
Collaborator Author

larshp commented Apr 6, 2021

okay, then it might be something that is not supported in vscode yet

which editor and validation do you recommend using? as the formats will be open source, I suggest building the definitions in easily accessible/free tooling, so that anyone can contribute. If the features are not supported by editors yet, I suggest not using those features

@schneidermic0
Copy link
Contributor

It seems to be supported (e.g., by VSCode), but the above mentioned syntax seems to be wrong due to https://json-schema.org/understanding-json-schema/reference/conditionals.html

Conditional subschemas have to be defined in the following way (the key "properties" is missing in @huber-nicolas example:

"if": {
  "properties": { "useFallbackClass": { "const": "true" } }
},
"then": {
  "required": [ "fallbackClass" ]
},

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants