-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
[BUG][JAVA] Model generated from allOf is unusable when combining $ref and inline schema (regression from 7.1.0) #17534
Comments
We are also running into issues regarding allof constructions specifically since 7.2! |
please fall back to v7.1.0 for the time being. i've filed #17683 to fix the issue. |
I've tried my test case with #17683 and it did not fix the issue. Running the attached test project with
|
what exact is this "type"? A string extending another string? |
if we look at the whole thing:
looks like MyBaseType is the base type and this model has a single property called so what exactly is "someProperty"? just a nullable string? |
Hi @wing328, apologies for the confusion, I see a little mistake slipped into the sample project. I have an updated version of the sample project, with the following changes:
The issue however is still there, also with |
👌 I'll take a look later this week instead |
Hi, this issue seems to still be present in the latest version of the generator. Example OAS that results in error: "NullableModel": {
"allOf": [
{
"$ref": "#/components/schemas/SomeString"
}
],
"nullable": true
},
"SomeString": {
"type": "string"
}, |
Bug Report Checklist
Description
In an OpenAPI specification where schema components use
allOf
to combine a$ref
with inline properties, openapi-generator generates Java classes thatopenapi-generator version
This issue popped up when Renovate suggested an upgrade from openapi-generator 7.1.0 to 7.2.0. I therefor believe it is a regression in 7.2.0.
OpenAPI declaration file content or url
Full spec included in the attached test-sdk.zip. I believe the relevant part is this:
Generation Details
Steps to reproduce
This generates two OpenAPI client in the same output directory (one with v7.1.0, one with v7.2.0). The
ExampleTest
illustrates the problem with the code that gets generated by v7.2.0.Related issues/PRs
Suggest a fix
The text was updated successfully, but these errors were encountered: