Update to Microsoft.OpenApi v2.0.0-preview5#60002
Merged
captainsafia merged 4 commits intomainfrom Jan 23, 2025
Merged
Conversation
Contributor
captainsafia
commented
Jan 22, 2025
- Consume changes to add native AoT-compat back to to the library
- Consume changes to fix OpenAPI tag references in operations
- React to changes in Serialize APIs
BrennanConroy
approved these changes
Jan 22, 2025
| var document = await targetDocumentService.GetOpenApiDocumentAsync(scopedService.ServiceProvider); | ||
| var jsonWriter = new OpenApiJsonWriter(writer); | ||
| document.Serialize(jsonWriter, openApiSpecVersion); | ||
| await document.SerializeAsync(jsonWriter, openApiSpecVersion); |
Member
There was a problem hiding this comment.
Should we be flowing a cancellation token from somewhere? Looks like this might only be for the command line tool so it's fine?
Contributor
Author
There was a problem hiding this comment.
Yeah, for this particular codepath, we don't have a CancellationToken to pass through to this API. We could probably consider adding one for the interface overall as part of #58353 but it's not feasible at the moment.
Contributor
There was a problem hiding this comment.
Copilot reviewed 5 out of 14 changed files in this pull request and generated 1 comment.
Files not reviewed (9)
- eng/Versions.props: Language not supported
- eng/testing/linker/project.csproj.template: Language not supported
- src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=controllers.verified.txt: Language not supported
- src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=forms.verified.txt: Language not supported
- src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=responses.verified.txt: Language not supported
- src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=schemas-by-ref.verified.txt: Language not supported
- src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=v1.verified.txt: Language not supported
- src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Integration/snapshots/OpenApiDocumentIntegrationTests.VerifyOpenApiDocument_documentName=v2.verified.txt: Language not supported
- src/Tools/GetDocumentInsider/tests/GetDocumentTests.cs: Evaluated as low risk
Comments suppressed due to low confidence (1)
src/OpenApi/src/Services/OpenApiDocumentService.cs:63
- [nitpick] Consider using Array.Empty() instead of []. This is more explicit and improves readability.
var schemaTransformers = _options.SchemaTransformers.Count > 0 ? new IOpenApiSchemaTransformer[_options.SchemaTransformers.Count] : [];
...Core.OpenApi.Tests/Services/OpenApiDocumentService/OpenApiDocumentServiceTests.Operations.cs
Outdated
Show resolved
Hide resolved
…penApiDocumentService/OpenApiDocumentServiceTests.Operations.cs
...Core.OpenApi.Tests/Services/OpenApiDocumentService/OpenApiDocumentServiceTests.Operations.cs
Outdated
Show resolved
Hide resolved
…penApiDocumentService/OpenApiDocumentServiceTests.Operations.cs Co-authored-by: Brennan <brecon@microsoft.com>
captainsafia
pushed a commit
that referenced
this pull request
Feb 11, 2025
* Update to Microsoft.OpenApi v2.0.0-preview5 * Address feedback * Update src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Services/OpenApiDocumentService/OpenApiDocumentServiceTests.Operations.cs * Update src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Services/OpenApiDocumentService/OpenApiDocumentServiceTests.Operations.cs Co-authored-by: Brennan <brecon@microsoft.com> --------- Co-authored-by: Brennan <brecon@microsoft.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.