Open VBA-N7 opened 3 months ago
can you please enabled the normalizer rule REFACTOR_ALLOF_WITH_PROPERTIES_ONLY
?
oneOf: - $ref: '#/components/schemas/Treat'
this is an inline schema so it will be created as a model separately
Thanks @wing328 for your help, it works !
Could you please indicate me if it is a normal behavior ?
- When im using the second syntax, i dont understand why it is generating a
DogAllOfFoodEaten
.Actual:
self.openapi_types = { 'food_eaten': List[DogAllOfFoodEaten] }
Expected:
self.openapi_types = { 'food_eaten': List[Treat | DogBiscuit | SomethingElse] }
Thanks !
Hi, I'm not sure what i will describe is a bug; I prefer to give you some clues and have a little chat before openning a bug.
Context: I fetch a swagger generated from one of my colleagues who is using Swashbuckle and the inheritance for the Dog schema use the following syntax:
When generate python flask server, the imports are kinda broken.
docker run --rm -v "${PWD}:/local" openapitools/openapi-generator-cli:v7.6.0 generate -i /local/test.yaml -g python-flask -o /local/dist
I saw on swagger.io that the syntax of allOf should be the following one:
When i'm using this one, the imports are correct (working):
DogAllOfFoodEaten
.Actual:
Expected:
Thanks for all you have done so far. I really appreciate it. Have a good day.