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

Remove abused allOf from OpenAPI v3 spec #319

Merged
1 commit merged into from
May 24, 2023
Merged

Conversation

ghost
Copy link

@ghost ghost commented May 24, 2023

Description

This commit removes the allOf from several objects in the openapi spec where properties of those fields needed to be overridden. Instead those fields are replicated between the object schemas.

Unfortunately this does increase the maintenance requirement as schemas like ScanConfig and ScanConfigRelationship need to be kept in sync, but this ensures that the code generation understands the field typing correctly so that it can be used in the code properly.

Type of Change

[ ] Bug Fix
[ ] New Feature
[ ] Breaking Change
[X] Refactor
[ ] Documentation
[ ] Other (please describe)

Checklist

  • I have read the contributing guidelines
  • Existing issues have been referenced (where applicable)
  • I have verified this change is not present in other open pull requests
  • Functionality is documented
  • All code style checks pass
  • New code contribution is covered by automated tests
  • All new and existing tests pass

@ghost ghost self-requested a review as a code owner May 24, 2023 09:04
chrisgacsal
chrisgacsal previously approved these changes May 24, 2023
Copy link
Contributor

@chrisgacsal chrisgacsal left a comment

Choose a reason for hiding this comment

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

This is awesome! LGTM! :shipit:

@ghost ghost force-pushed the fix_empty_interfaces_in_api branch 2 times, most recently from 721c4ee to e7b3cef Compare May 24, 2023 10:52
akpsgit
akpsgit previously approved these changes May 24, 2023
@chrisgacsal chrisgacsal self-requested a review May 24, 2023 14:30
chrisgacsal
chrisgacsal previously approved these changes May 24, 2023
This commit removes the allOf from several objects in the openapi spec
where properties of those fields needed to be overridden. Instead those
fields are replicated between the object schemas.

Unfortunately this does increase the maintainance requirement as schemas
like ScanConfig and ScanConfigRelationship need to be kept in sync, but
this ensures that the code generation understands the field typing
correctly so that it can be used in the code properly.
@ghost ghost dismissed stale reviews from chrisgacsal and akpsgit via 9dd9669 May 24, 2023 14:35
@ghost ghost force-pushed the fix_empty_interfaces_in_api branch from e7b3cef to 9dd9669 Compare May 24, 2023 14:35
@ghost ghost added this pull request to the merge queue May 24, 2023
Merged via the queue into main with commit ac560ee May 24, 2023
@ghost ghost deleted the fix_empty_interfaces_in_api branch May 24, 2023 15:25
This pull request was closed.
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

3 participants