-
Notifications
You must be signed in to change notification settings - Fork 79
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
rulebook json schema is invalid #397
Comments
This was referenced Mar 1, 2023
mkanoor
added a commit
that referenced
this issue
Mar 1, 2023
ssbarnea
added a commit
to ssbarnea/ansible-rulebook
that referenced
this issue
Mar 2, 2023
As the support for the very old draft-4 was removed from at least one critical tool (ajv), we switch to draft-7 which also happens to be the version used by all the other Ansible related schemas. Related: ajv-validator/ajv#472 Related: ansible/ansible-lint#3079 Related: ansible#397
ssbarnea
added a commit
to ssbarnea/ansible-rulebook
that referenced
this issue
Mar 2, 2023
As the support for the very old draft-4 was removed from at least one critical tool (ajv), we switch to draft-7 which also happens to be the version used by all the other Ansible related schemas. Related: ajv-validator/ajv#472 Related: ansible/ansible-lint#3079 Related: ansible#397 We also include the "examples" extension, which informs ansible-lint about which glob file patters should use this schema.
ssbarnea
added a commit
to ssbarnea/ansible-rulebook
that referenced
this issue
Mar 2, 2023
As the support for the very old draft-4 was removed from at least one critical tool (ajv), we switch to draft-7 which also happens to be the version used by all the other Ansible related schemas. Related: ajv-validator/ajv#472 Related: ansible/ansible-lint#3079 Related: ansible#397 We also include the "examples" extension, which informs ansible-lint about which glob file patters should use this schema.
ttuffin
pushed a commit
that referenced
this issue
Mar 2, 2023
As the support for the very old draft-4 was removed from at least one critical tool (ajv), we switch to draft-7 which also happens to be the version used by [all the other](https://github.com/ansible/ansible-lint/tree/main/src/ansiblelint/schemas) Ansible related schemas. Related: ajv-validator/ajv#472 Related: ansible/ansible-lint#3079 Related: #397 Co-authored-by: Alex <aizquier@redhat.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The current JSON Schema file is invalid for at least two reasons and I would suggest running some schema validation using both python-jsonschema and the ajv library in order to ensure that the schema file can be consumed by most clients.
Identified problems:
$id
field should be a valid permalink to the file itself, now is a broken 404 url pointing to https://www.ansible.com/schema/ruleset.json - easiest fix would be to use https://raw.githubusercontent.com/ansible/ansible-rulebook/main/ansible_rulebook/schema/ruleset_schema.json$schema
field is having a trailing hash and it should be exactlyhttps://json-schema.org/draft-04/schema
instead.Blocking: ansible/ansible-lint#3103
The text was updated successfully, but these errors were encountered: