Skip to content

Update to Microsoft.OpenApi 2.0.0-preview.18 #61928

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

Merged
merged 1 commit into from
May 14, 2025
Merged

Conversation

captainsafia
Copy link
Member

This pull request updates the Microsoft.OpenApi and related libraries to version 2.0.0-preview.18 and replaces the usage of OpenApiAny with JsonNodeExtension across the codebase. It also removes unused using Microsoft.OpenApi.Any statements in several files. These changes improve compatibility with the updated library version and streamline the code.

Dependency Updates:

  • Updated MicrosoftOpenApiVersion and MicrosoftOpenApiYamlReaderVersion to 2.0.0-preview.18 in eng/Versions.props.

Code Refactoring:

  • Replaced OpenApiAny with JsonNodeExtension for schema extensions in multiple files, such as TransformersBenchmark.cs, CustomSchemaTransformerTests.cs, and SchemaTransformerTests.cs. This improves alignment with the updated library. [1] [2] [3]

Cleanup:

  • Removed unused using Microsoft.OpenApi.Any statements and replaced them with using Microsoft.OpenApi.Extensions where necessary in both source and test files. [1] [2] [3]

Test Updates:

  • Updated test assertions to use JsonNodeExtension instead of OpenApiAny to validate schema extensions in test files, such as SchemaTransformerTests.cs and OpenApiSchemaReferenceTransformerTests.cs. [1] [2]

These changes ensure compatibility with the latest library version and remove deprecated or unused code.

@captainsafia captainsafia requested review from a team and wtgodbe as code owners May 14, 2025 00:23
@github-actions github-actions bot added the needs-area-label Used by the dotnet-issue-labeler to label those issues which couldn't be triaged automatically label May 14, 2025
@captainsafia captainsafia added area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates feature-openapi area-minimal Includes minimal APIs, endpoint filters, parameter binding, request delegate generator etc and removed needs-area-label Used by the dotnet-issue-labeler to label those issues which couldn't be triaged automatically labels May 14, 2025
Copy link
Contributor

@mikekistler mikekistler left a comment

Choose a reason for hiding this comment

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

Looks good! 👍

@captainsafia captainsafia merged commit b47b064 into main May 14, 2025
28 checks passed
@captainsafia captainsafia deleted the safia/update-openapi branch May 14, 2025 17:08
@dotnet-policy-service dotnet-policy-service bot added this to the 10.0-preview5 milestone May 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-minimal Includes minimal APIs, endpoint filters, parameter binding, request delegate generator etc area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates feature-openapi
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants