Skip to content

refuses to generate valid allOf combinations #1083

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

Closed
rtaycher opened this issue Jul 24, 2024 · 3 comments
Closed

refuses to generate valid allOf combinations #1083

rtaycher opened this issue Jul 24, 2024 · 3 comments

Comments

@rtaycher
Copy link
Contributor

Describe the bug
My understanding of allOf is that its supposed to recursively combine 2+ dictionaries and only fail if multiple types cant be satisfied(such as if the same path has different types assigned). At first I thought it didn't like it if subdictionaries had different values but then I realized other openapi tools validated it and it didn't have conflicts.

I managed to cut down the example and even having the same two subdicts with the same name triggers the error

Cannot parse response for status code 200 (Properties has conflicting values), response will be omitted from generated client

openapi-example.yaml.json because github doesnt like yaml
rename to yaml and run openapi-python-client generate --path openapi-example to verify.

https://editor.swagger.io/ validates it and will even let you generate official swagger client with this example

OpenAPI Spec File
A link to an OpenAPI document which produces this issue. Ideally, write a minimal reproduction only containing the problematic pieces.

Additional context
result

Generating example-client
Warning(s) encountered while generating. Client was generated, but some pieces may be missing
WARNING parsing GET /test within default.

Cannot parse response for status code 200 (Properties has conflicting values), response will be ommitted from generated client

Also apparently ommitted is a misspelling and it should be omitted

@eli-bl
Copy link
Collaborator

eli-bl commented Aug 14, 2024

I think that my #1090 is the same thing. I'm not sure which part of your spec it was failing on, but I tried your spec locally using my changes in #1096 and it worked. That PR also fixes the "ommitted" typo that you pointed out.

@rtaycher
Copy link
Contributor Author

rtaycher commented Aug 15, 2024

Thanks @eli-bl . I'm not actually sure if this fixes the issue I was seeing, hopefully it does.

I found this big near the end of my time at my previous job and filed a simplified version of what I was seeing after I had moved on and no longer had access to the source yaml (plus a simpler example is better right?). Hopefully your fix helps the person who inherited my openapi tasks.

@eli-bl
Copy link
Collaborator

eli-bl commented Nov 18, 2024

@dbanty, I'll close this - it does seem to have been fixed as described above.

@eli-bl eli-bl closed this as completed Nov 18, 2024
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

No branches or pull requests

2 participants