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

move refs under allOfs where required #525

Merged
merged 4 commits into from
Dec 16, 2024

Conversation

braingram
Copy link
Collaborator

@braingram braingram commented Dec 10, 2024

Including a $ref key in a schema mapping/object/dict comes with the requirement that other members of that mapping are ignored. See https://datatracker.ietf.org/doc/html/draft-pbryan-zyp-json-ref-03#section-3

This PR updates the RAD schemas nesting $refs in allOf combiners when the mapping contains other items and adds a test to verify the changes.

Romancal regtests all pass: https://github.com/spacetelescope/RegressionTests/actions/runs/12260132209

Tasks

  • Update or add relevant rad tests.
  • Update relevant docstrings and / or docs/ page.
  • Does this PR change any schema files?
    • Schema changes were discussed at RAD Review Board meeting.
  • Does this PR change any API used downstream? (If not, label with no-changelog-entry-needed.)
News fragment change types:
  • changes/<PR#>.feature.rst: new feature
  • changes/<PR#>.bugfix.rst: fixes an issue
  • changes/<PR#>.doc.rst: documentation change
  • changes/<PR#>.removal.rst: deprecation or removal of public API
  • changes/<PR#>.misc.rst: infrastructure or miscellaneous change

Copy link

codecov bot commented Dec 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.41%. Comparing base (a60eed1) to head (0fd380a).
Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #525      +/-   ##
==========================================
+ Coverage   96.24%   96.41%   +0.16%     
==========================================
  Files           4        4              
  Lines         213      223      +10     
==========================================
+ Hits          205      215      +10     
  Misses          8        8              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

tests/test_schemas.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@schlafly schlafly left a comment

Choose a reason for hiding this comment

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

Okay, thanks Brett. I'm not a maintainer but I'm happy to approve a bug fix that passes regtests. This does also highlight that we don't have any tvac / fps tests in the current regtests; perhaps @stscieisenhamer can add one of those as part of his TVAC translation tests.

@braingram braingram merged commit 8d06d03 into spacetelescope:main Dec 16, 2024
13 checks passed
@braingram braingram deleted the fix_refs branch December 16, 2024 20:25
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