swagger-api / swagger-api/swagger-codegen
Python-flask server stub generation fails using anyOf
Open
@HugoMario is already working on this.
Since May 8, 2020.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
Example on a requestbody:
items:
anyOf:
- $ref: '#/components/schemas/FingerPosition'
- $ref: '#/components/schemas/CameraPose'
this fails on python-flask (not on other server stubs) with the following error:
Error.There was an error generating the servers python-flask code. Please ensure that the definition and all external refs (inc. domains) are valid.
replacing with, for example:
items:
type: string
works
Swagger-codegen version
Swagger Codegen to v. 2.4.9 for OpenAPI 2.0 and 3.0.13 for OpenAPI 3.0.
Swagger declaration file content or url
Command line used for generation
Steps to reproduce
Related issues/PRs
Suggest a fix/enhancement
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.