Skip to content

Conversation

baywet
Copy link
Member

@baywet baywet commented Oct 6, 2025

This large PR adds support for OpenAPI 3.2.0 🎉🎉🎉🎉

This PR contains multiple source breaking changes (see the updated public API export) and will require a new major version bump. OAI 3.2.0 is fully backward compatible with 3.1.0 (additive), and provides many new interesting features like support for additional HTTP methods, better support for streaming APIs in the age of AI integration, and much more. This PR contains all the new features, except for resolution of references relying on $self since resolution based off $id is not implemented either. This PR also contains CI configuration changes to have a support branch for v2.X like we have a support branch for v1.X. This PR also contains an upgrade guide to v3 (feedback welcome).

In terms of implementation work, you'll notice that all the deserialization infrastructure from 3.1 was duplicated for 3.2. While not optimal in terms of code management (which is somewhat mitigated by coding assistants being able to replicate changes across versions) and binary size, it was done this way to:

  • reduce any risk on 3.1/3.0 support side effect.
  • maintain consistency with the implementation pattern for 3.1.
  • fast-track the review work, instead of bringing a huge refactoring.

I'll still need to tackle this issue before it's code complete BinkyLabs#47, opening for visibility and so we can start the review process.

I've also reached out to @captainsafia internally, who has confirmed NET10 will ship with version 2.X of this library, adding support for OAI3.1. But they've already communicated with customers support for 3.2.0 won't ship with this upcoming version since the standard version came out too late for this release.

fixes #2516

TODO BEFORE MERGE:

  • create the support/v2 branch.

TODO AFTER MERGE:

  • duplicate to v1/v2 .azure-pipelines/ci-build.yml
  • .github/policies/OpenAPI.NET-branch-protection.yml
  • .github/release-please.yml
  • .github/workflows/codeql-analysis.yml
  • .github/workflows/release-please-gha.yml
  • (contributing)
  • (pr template)

baywet and others added 30 commits September 23, 2025 21:05
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
adds new OAS vesion and serialization/deserialization infrastructure
sync from upstream main
…ialization-infrastructure-for-v32

Adds serialization/deserialization unit tests for 3.2
* Initial plan

* Add Summary support to OpenApiResponse with serialization/deserialization

Co-authored-by: baywet <7905502+baywet@users.noreply.github.com>

* Complete implementation with reference support and test fixes

Co-authored-by: baywet <7905502+baywet@users.noreply.github.com>

* Update IOpenApiResponse to derive from IOpenApiSummarizedElement

Co-authored-by: baywet <7905502+baywet@users.noreply.github.com>

* Apply suggestions from code review

* Apply suggestion from @baywet

* chore: copy reference implementation

Signed-off-by: Vincent Biret <vibiret@microsoft.com>

* chore: adds missing using

Signed-off-by: Vincent Biret <vibiret@microsoft.com>

* chore: linting

Signed-off-by: Vincent Biret <vibiret@microsoft.com>

* chore: updates public API export

Signed-off-by: Vincent Biret <vibiret@microsoft.com>

---------

Signed-off-by: Vincent Biret <vibiret@microsoft.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: baywet <7905502+baywet@users.noreply.github.com>
Co-authored-by: Vincent Biret <vincentbiret@hotmail.com>
Co-authored-by: Vincent Biret <vibiret@microsoft.com>
Co-authored-by: baywet <7905502+baywet@users.noreply.github.com>
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
Co-authored-by: baywet <7905502+baywet@users.noreply.github.com>
…b196-901596c61b07

feat: Implement OpenAPI 3.2.0 server name field
…ization

Co-authored-by: baywet <7905502+baywet@users.noreply.github.com>
Co-authored-by: baywet <7905502+baywet@users.noreply.github.com>
baywet and others added 13 commits October 3, 2025 16:37
…9aa8-a50a721fd288

feat: Add support for media types components in OAS 3.2.0
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
Signed-off-by: Vincent Biret <vincentbiret@hotmail.com>
Signed-off-by: Vincent Biret <vincentbiret@hotmail.com>
Signed-off-by: Vincent Biret <vincentbiret@hotmail.com>
Signed-off-by: Vincent Biret <vincentbiret@hotmail.com>
feat: add new v32 properties for Path Items (query, additional operations)
Signed-off-by: Vincent Biret <vincentbiret@hotmail.com>
chore: disables WPF solution on non windows platforms
@baywet baywet requested a review from a team as a code owner October 6, 2025 15:09
baywet added 4 commits October 7, 2025 15:12
docs: adds a pull request template

Signed-off-by: Vincent Biret <vibiret@microsoft.com>
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
adrian05-ms
adrian05-ms previously approved these changes Oct 8, 2025
docs: adds guidance regarding branches
Comment on lines +200 to +204
foreach(var type in list.Where(static t => t is not null))
{
var schemaType = type.ToJsonSchemaType();
combinedType |= schemaType;
}

Check notice

Code scanning / CodeQL

Missed opportunity to use Select Note

This foreach loop immediately
maps its iteration variable to another variable
- consider mapping the sequence explicitly using '.Select(...)'.
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 3.2.0 support
4 participants