Skip to content

Explain OpenAPI representation of int and long types in .NET 10 #35214

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mikekistler
Copy link
Contributor

@mikekistler mikekistler commented Apr 12, 2025

This PR adds an explanation for the change in how int and long properties/parameters are represented in OpenAPI documents generated by .NET 10.

I also used this opportunity to consolidate the information about the breaking changes introduces by OpenApi.Net v2.

Fixes dotnet/aspnetcore#61038


Internal previews

📄 File 🔗 Preview link
aspnetcore/release-notes/aspnetcore-10.0.md aspnetcore/release-notes/aspnetcore-10.0

* Update OpenAPI document generation details
* Format openApi.md for better readability
@Rick-Anderson
Copy link
Contributor

@mikekistler should this be added to the OpenApi docs? If so, open an issue for the relevant doc.

@@ -34,6 +37,10 @@ OpenAPI 3.1 support was primarily added in the following [PR](https://github.com
### OpenAPI 3.1 breaking changes

Support for OpenAPI 3.1 requires an update to the underlying OpenAPI.NET library to a new major version, 2.0. This new version has some breaking changes from the previous version. The breaking changes may impact apps if they have any document, operation, or schema transformers.
Breaking changes in this iteration include the following:

* Entities within the OpenAPI document, like operations and parameters, are typed as interfaces. Concrete implementations exist for the inlined and referenced variants of an entity. For example, an `IOpenApiSchema` can either be an inlined `OpenApiSchema` or an `OpenApiSchemaReference` that points to a schema defined elsewhere in the document.
Copy link
Member

Choose a reason for hiding this comment

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

I left a comment similar to this here: microsoft/OpenAPI.NET#2298 (comment)

Like @Rick-Anderson said, this item can probably be copy-pasted right into their docs too.

Copy link
Contributor

Choose a reason for hiding this comment

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

Like @Rick-Anderson said, this item can probably be copy-pasted right into their docs too.

@martincostello can you recommend which doc and section?

Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure about the section, but this is the document: https://github.com/microsoft/OpenAPI.NET/blob/main/docs/upgrade-guide-2.md

Co-authored-by: Martin Costello <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[OpenAPI] integers have additional string type with pattern
3 participants