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

Fix how '--check-metaschema' builds validators #230

Merged
merged 3 commits into from Jan 20, 2023
Merged

Conversation

sirosen
Copy link
Member

@sirosen sirosen commented Jan 20, 2023

This should resolve the primary bug in #220. I'll need to file a follow-up for the additional feature work related to that use-case.

This was an intermediate method which doesn't appear to be necessary,
and leverages caching behavior which is never used. Remove it and move
the body into `get_validator` (its only caller).
Metaschema checking was not building the validator correctly.
Primarily two fixes are applied here:
- the metaschema's schema dialect is no longer copied from the schema
  being checked, but is taken from the metaschema document
- metaschema checking now automatically includes format checking and
  applies the CLI parameters for format checking (including the
  ability to disable format checking)

Add test for an invalid format under metaschema. This test requires
one of the format checking libraries, and therefore drives the need
for new features in the testsuite, including the addition of config
for the example file tests. Example file config is schema-validated,
which serves as another dogfooding self-check.

The test file imitates the driving use-case in #220

The acceptance test definition is refactored to make managing the test
data a little easier.
@sirosen sirosen merged commit eed1aea into main Jan 20, 2023
@sirosen sirosen deleted the fix-check-metaschema branch January 20, 2023 19:13
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.

None yet

1 participant