BREAKING CHANGE!: Use Microsoft OpenAPI document instead of own model#1
BREAKING CHANGE!: Use Microsoft OpenAPI document instead of own model#1pomianowski merged 7 commits intomainfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR implements a major breaking change to rewrite the OpenAPI Client source generator to use Microsoft's OpenAPI document instead of the custom model. The change moves from a custom schema implementation to leveraging Microsoft.OpenApi libraries for parsing and processing OpenAPI specifications.
- Replaced custom OpenAPI schema models with Microsoft.OpenApi library
- Rewrote the source generator architecture to use a simpler, more direct approach
- Updated test infrastructure and added comprehensive test coverage for multiple OpenAPI versions
Reviewed Changes
Copilot reviewed 110 out of 116 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| OpenApiClientGenerator.cs | Complete rewrite to use Microsoft.OpenApi instead of custom schema parsing |
| OpenApi.Client.csproj | Updated dependencies and build configuration for new architecture |
| OpenApi.Client.SourceGenerators.csproj | New project structure with Microsoft.OpenApi dependencies |
| Test files | Added comprehensive test infrastructure with support for OpenAPI 1.2-3.1 specifications |
Comments suppressed due to low confidence (1)
src/OpenApi.Client.SourceGenerators/OpenApiClientGenerator.cs:56
- [nitpick] Method name 'ComputeClassForGeneration' is unclear. Consider renaming to 'ExtractMetadataFromSyntax' or 'ParseGeneratorMetadata' to better describe what the method does.
private static SourceGeneratorMetadata? ComputeClassForGeneration(
|
|
||
| GeneratorDriverRunResult result = driver.GetRunResult(); | ||
|
|
||
| var test = 1; |
There was a problem hiding this comment.
Remove unused variable 'test'. This appears to be leftover debug code that should be cleaned up.
| var test = 1; | |
| // (Line removed) |
| "type": "string" | ||
| }, | ||
| "description": "User roles." | ||
| }, |
There was a problem hiding this comment.
Trailing comma in JSON object is invalid. Remove the comma after the 'roles' property on line 248.
| }, | |
| } |
Pull request type
Please check the type of change your PR introduces:
What is the new behavior?
Rewrite model.