-
Notifications
You must be signed in to change notification settings - Fork 106
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
schema inputs should prefer specific types instead of general strings #524
Comments
Hi, @jtmoon79 thanks for reporting! |
Huh, I can't reproduce this @jtmoon79. Does the issue still repro if you remove that |
I saw the same when using In
What am I missing? |
This came up on SchemaStore, as validators like VSCode and others don't recognize numbers as valid for timeoutInMinutes (which is how all the examples in this repo are done, I'd recommend using the examples as input and trying to validate them with the schema file provided). SchemaStore/schemastore#3560 |
Problem
This Azure Pipeline YAML code, validated against
service-schema.json
97f39ff, runs just fine in Azure Devops (greatly simplified for sake of clarity):So it runs okay, yet the
20
andtrue
andfalse
are red underlined with hover errorsThe fix is to make the inputs into strings:
However, now the following non-sense YAML values is also considered valid (no hover errors):
Solution
It's nice to use raw numbers, booleans, etc. for inputs where such types are expected. Then the user is given more accurate feedback about expected values for various inputs.
Also, in VS Code, they are visually different than plain strings, which is nice.
The text was updated successfully, but these errors were encountered: