Skip to content

feat: (PoC) Support OpenAPI 3.1.x#1231

Open
ZhongpinWang wants to merge 19 commits into
mainfrom
support-openapi-3.1
Open

feat: (PoC) Support OpenAPI 3.1.x#1231
ZhongpinWang wants to merge 19 commits into
mainfrom
support-openapi-3.1

Conversation

@ZhongpinWang

@ZhongpinWang ZhongpinWang commented Jul 21, 2026

Copy link
Copy Markdown

Context

This is a generated (later manually reviewed and fixed) PoC for evaluating the effort of supporting OpenAPI 3.1.x in the generator.

The following two files coming from the initial round of generation might be outdated but you can use as a reference.

  • Check the OAS31_GAPS.md for the gaps evaluated.
  • Check the OAS31_CHANGES.md for the actual changes generated.

I generated all data models in AI SDK Java with the new SNAPSHOT cloud sdk generator, and there were no breaking changes.

See SAP/ai-sdk-java#958 for the generated result.

@CharlesDuboisSAP CharlesDuboisSAP left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Some test coverage is lacking, you could add some more unit tests

{
return isOas31(rootNode.path("openapi").asText(null));
final String version = openAPI.getOpenapi();
return version != null && version.startsWith("3.1");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Shouldn’t it be version >= 3.1 ?

@ZhongpinWang ZhongpinWang Jul 23, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

It is hard to say >= 3.1 as they don't follow SemVer any more since 3.1. So there can be breaking changes in 3.2 and it should have an additional isOas32 to control the process logic.

So what is true in 3.1 may not be true in 3.2. As for now, I would suggest we just announce support for 3.1 and say 3.2 not supported.

@ZhongpinWang
ZhongpinWang marked this pull request as ready for review July 23, 2026 13:42
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.

3 participants