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

Check for #224 regression #508

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

jamesmyatt
Copy link

I don't think that #224 is resolved. This should prove it.

@jamesmyatt jamesmyatt requested review from a team as code owners February 2, 2023 15:39
@winstliu
Copy link
Member

winstliu commented Feb 2, 2023

Looks like tests are passing, @jamesmyatt. Can you explain more why you think there's been a regression?

@jamesmyatt
Copy link
Author

jamesmyatt commented Feb 3, 2023

Using this schema with check-jsonschema fails to validate in cases where the boolean is stored as a literal boolean rather than a string recognised as boolean. For example: python-jsonschema/check-jsonschema#237

Looking at the Azure DevOps documents, they recommend using boolean true, rather than string "true": e.g. https://learn.microsoft.com/en-us/azure/devops/pipelines/yaml-schema/trigger?view=azure-pipelines#trigger-batch-branches-paths-tags

However the schema doesn't allow this (See https://github.com/microsoft/azure-pipelines-vscode/blob/main/service-schema.json#L4008) which is the same issue issue as #224 , which was closed as fixed.

I thought it would be worth updating the test cases to include something that validates against #/definitions/boolean, and I naively made a change that I thought would show this.

Fundamentally, either the schema is wrong or the documentation is wrong, since the schema says no literal booleans and the documentation says they're OK. Furthermore, the validator should fail for this change, which means that either the file isn't checked in the CI tests or the validator used here is non-compliant with the JSON Schema specification (as I understand it: I may also not understand the specification correctly).

What's the best way to proceed with this? As I understand it, the schema is automatically generated, but I don't know where from. And this (or something like it) is a recurring issue:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants