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

[tooling] Update schema generation #280

Merged
merged 3 commits into from
Oct 23, 2023

Conversation

BenjaminPelletier
Copy link
Member

We automatically generate JSON Schema for some of our data classes to help users manage our complex nested data structures. Previously, we simply tried to import the right modules and then search through the loaded modules for schemas to generate. This PR refines/fixes that approach by specifically targeting only and all the schemas needed to describe:

  • USSQualifierConfiguration (the input to uss_qualifier)
  • TestRunReport (the output from uss_qualifier)
  • Any types used as specifications for Resources (these are not strongly-typed in the configuration)
  • Any types used as specifications for ActionGenerators (these are not strongly-typed in the configuration)

The first commit of this PR is just the code changes (including two bug fixes in Resource definitions), then the second commit is the consequence of deleting all the old schemas and then regenerating them. The latter commit has more changes than is absolutely necessary because a while back we switched to sort_keys=True when writing the JSON, but we don't overwrite old content if its data content is correct (just its keys are out of order).

@BenjaminPelletier BenjaminPelletier marked this pull request as ready for review October 21, 2023 06:46
Copy link
Contributor

@barroco barroco left a comment

Choose a reason for hiding this comment

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

👍 (Another reason for the big changeset is the usage of qualname (in fullname) instead of name to describe field names.)

@BenjaminPelletier BenjaminPelletier merged commit efd11c1 into interuss:main Oct 23, 2023
8 checks passed
@BenjaminPelletier BenjaminPelletier deleted the schema-generation branch October 23, 2023 16:23
github-actions bot added a commit that referenced this pull request Oct 23, 2023
* Update schema generation code

* Run schema generation efd11c1
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