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(openapi-schema): fix openapi schema generator #12590

Merged

Conversation

david-leifker
Copy link
Collaborator

Checklist

  • The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
  • Links to related issues (if applicable)
  • Tests for the changes have been added/updated (if applicable)
  • Docs related to the changes have been added/updated (if applicable). If a new feature has been added a Usage Guide has been added for the same.
  • For any breaking change/potential downtime/deprecation/big changes an entry has been made in Updating DataHub

@github-actions github-actions bot added the devops PR or Issue related to DataHub backend & deployment label Feb 10, 2025
@datahub-cyborg datahub-cyborg bot added the pending-submitter-response Issue/request has been reviewed but requires a response from the submitter label Feb 10, 2025
@@ -734,7 +736,11 @@ private static Schema buildAspectsRefResponseSchema(final EntityRegistry entityR
// Create a list of reference schemas for each aspect
List<Schema> aspectRefs =
entityRegistry.getAspectSpecs().values().stream()
.map(aspect -> new Schema<>().$ref(PATH_DEFINITIONS + toUpperFirst(aspect.getName())))
.filter(a -> definitionNames.contains(a.getName()))
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there any case in which we would expect this to be false for an aspect?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is a hold over in a way from a previous implementation which would restrict aspects/entities which the schema conversion process was broken. I could see in the future adding some filters in like entity-registry to selectively include or exclude from the api, however there is no such filtering today.

Copy link

codecov bot commented Feb 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Files with missing lines Coverage Δ
.../datahubproject/openapi/v3/OpenAPIV3Generator.java 90.16% <100.00%> (+0.03%) ⬆️

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 15ac294...163e872. Read the comment docs.

@datahub-cyborg datahub-cyborg bot added pending-submitter-merge and removed pending-submitter-response Issue/request has been reviewed but requires a response from the submitter labels Feb 10, 2025
@david-leifker david-leifker merged commit 6098e97 into datahub-project:master Feb 11, 2025
209 of 254 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devops PR or Issue related to DataHub backend & deployment pending-submitter-merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants