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

Add JSON Schema validation method #161

Merged
merged 1 commit into from
May 30, 2022

Conversation

thrix
Copy link
Collaborator

@thrix thrix commented May 24, 2022

Add method for validation JSON Schema to any node.

It validates the data attribute with the provided JSON
Schema passed as a loaded YAML.

Signed-off-by: Miroslav Vadkerti mvadkert@redhat.com

@thrix thrix force-pushed the jsonschema-validation branch from b99af75 to ee11e91 Compare May 24, 2022 13:30
@thrix thrix requested a review from happz May 24, 2022 19:40
@thrix
Copy link
Collaborator Author

thrix commented May 24, 2022

/packit test

@psss psss self-assigned this May 26, 2022
@psss psss added the base label May 26, 2022
@psss psss added this to the 1.1 milestone May 26, 2022
Copy link
Collaborator

@psss psss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Added just a couple of nitpicks plus converted generator to list to match the defined type. Does it look good?

fmf/base.py Show resolved Hide resolved
Add method for validation JSON Schema to any node.

It validates the `data` attribute with the provided JSON
Schema passed as a loaded YAML.

Signed-off-by: Miroslav Vadkerti <mvadkert@redhat.com>
@lukaszachy
Copy link
Collaborator

Good catch with the generator. My past experience says that it is easy to exhaust it and later be surprised why suddenly the list is empty.

@psss psss force-pushed the jsonschema-validation branch from cec4c39 to 3f43823 Compare May 26, 2022 10:17
@thrix
Copy link
Collaborator Author

thrix commented May 26, 2022

@lukaszachy @psss merge pretty pls

@lukaszachy lukaszachy merged commit e5c03d2 into teemtee:main May 30, 2022
@lukaszachy
Copy link
Collaborator

@psss Merged to unblock development.

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

Successfully merging this pull request may close these issues.

4 participants