-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
Update to Microsoft.OpenApi v2.0.0-preview5 #60002
Conversation
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
@@ -57,7 +57,7 @@ public async Task GenerateAsync(string documentName, TextWriter writer, OpenApiS | |||
using var scopedService = serviceProvider.CreateScope(); | |||
var document = await targetDocumentService.GetOpenApiDocumentAsync(scopedService.ServiceProvider); | |||
var jsonWriter = new OpenApiJsonWriter(writer); | |||
document.Serialize(jsonWriter, openApiSpecVersion); | |||
await document.SerializeAsync(jsonWriter, openApiSpecVersion); |
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.
Should we be flowing a cancellation token from somewhere? Looks like this might only be for the command line tool so it's fine?
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.
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.
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.
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 <[email protected]>