-
Notifications
You must be signed in to change notification settings - Fork 10
[DMS-753] Placing the extension in the right place when Core and Extension have… #696
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the OpenAPI extension processing logic to correctly handle cases where core and extension schemas have the same property names. The refactoring introduces a new approach that analyzes property conflicts and redirects extension properties to their appropriate referenced schemas when conflicts occur.
Key changes include:
- Introduction of sophisticated property conflict detection and resolution logic
- Addition of multiple helper methods to handle complex extension scenarios
- Enhanced validation and error handling for extension schema processing
- Backward compatibility preservation for simple extension formats
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
File | Description |
---|---|
OpenApiDocument.cs | Major refactoring of extension processing with new conflict resolution logic and helper methods |
OpenApiDocumentTests.cs | New test suite to verify backward compatibility and refactored functionality |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
src/dms/core/EdFi.DataManagementService.Core/OpenApi/OpenApiDocument.cs
Outdated
Show resolved
Hide resolved
src/dms/core/EdFi.DataManagementService.Core/OpenApi/OpenApiDocument.cs
Outdated
Show resolved
Hide resolved
src/dms/core/EdFi.DataManagementService.Core/OpenApi/OpenApiDocument.cs
Outdated
Show resolved
Hide resolved
src/dms/core/EdFi.DataManagementService.Core/OpenApi/OpenApiDocument.cs
Outdated
Show resolved
Hide resolved
7795274
to
ea9e4fa
Compare
src/dms/core/EdFi.DataManagementService.Core/OpenApi/OpenApiDocument.cs
Outdated
Show resolved
Hide resolved
src/dms/core/EdFi.DataManagementService.Core/OpenApi/OpenApiDocument.cs
Outdated
Show resolved
Hide resolved
src/dms/core/EdFi.DataManagementService.Core/OpenApi/OpenApiDocument.cs
Outdated
Show resolved
Hide resolved
src/dms/core/EdFi.DataManagementService.Core/OpenApi/OpenApiDocument.cs
Outdated
Show resolved
Hide resolved
008e09f
to
466244e
Compare
The change consists of placing the extension in the right place when Core and Extension have the same property (sample extends it).
The following resources were successfully compared against ODS Stage (via Swagger: https://stage.preview.ed-fi.org/v7.3/docs/swagger/index.html?urls.primaryName=Resources):