-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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][Python] allOff not supported when used in array, in object #1657
Comments
FYI, getting similar issue when running against my file with latest 4.0 snapshot. If it would be helpful I can try to extract a test case that strips out the rest of the file. Relevant part seems to be:
|
@ericraymond I think what you see might be related to some buggy (or lack of) multi-level inheritance support. See also #1662 (comment) |
The issue from @ericraymond may also be related to #583? |
@ericraymond : @wing328 is working on a fix in #1842 |
allOf is now working in the If you need the allOf to work in any schema and at any depth of inlining, please use the python-experimental generator.
All of those tests are passing in CI in node4 |
Description
We have an object definition (i.e.
SomeRemoteObject
) which contains a schema which maps a few "names" (e.g.some_object_list
) to an array of items.Each of these items is a composition (using
allOf
) of an ID (i.e.RemoteId
) with data (i.e.SomeObjectData
).Note that it does work when we wrap
RemoteId
andSomeObjectData
inSomeObjectDataWithReference
first (seeallOf-python-issue.working.yaml
).Please note that I stripped down the example
yaml
file, to a bare minimum. For example theSomeRemoteObject
only contains one "name" being mapped to an array of items.When generating Python client code we get the following warning:
Please note that we also see these warning when generating for example
html
documentation or code for other target languages.openapi-generator version
I used OpenAPI generator CLI version
4.0.0-SNAPSHOT
:https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/4.0.0-SNAPSHOT/openapi-generator-cli-4.0.0-20181210.103357-85.jar
OpenAPI declaration file content or url
See
allOf-python-issue.yaml
in the attached zip-file:allOf-python-issue.zip
Command line used for generation
Steps to reproduce
See also
allOf-python-issue.sh
in the attached zip-file.allOf-python-issue.sh
will also generate the HTML documentation (which poses the same issue) and the working versionallOf-python-issue.working.yaml
.Related issues/PRs
Suggest a fix
I would like to make a suggestion, but I did not dive very deep into the code yet.
The text was updated successfully, but these errors were encountered: