You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use $ref parameters in my openapi yaml, however as soon as I insert a $ref entry no code is generated (the folder is but it contains no files) and no error is thrown.
I took the code from #24, so my minimum working example is:
Ok so I found out I can use $refs in the schema but this not so clean if I really want to use the exact same parameter in several places, I would need to repeat it in every place.
So in below API definition the demo_pizza_factory_instance is part of every query.
- name: demo_pizza_factory_instance
in: query
description: The service instance to address this request to.
required: true
schema:
$ref: "#/components/schemas/DemoPizzaFactoryInstance"
components:
schemas:
DemoPizzaFactoryInstance:
type: string
enum:
- hawaii
- funghi
I am trying to use $ref parameters in my openapi yaml, however as soon as I insert a $ref entry no code is generated (the folder is but it contains no files) and no error is thrown.
I took the code from #24, so my minimum working example is:
openapi.yaml
But the same happens with my actual openapi definition. As soon as I add a $ref parameter, no code is generated.
command:
fastapi-codegen -i openapi.yaml -o app
I am using fastapi-code-generator version 0.3.5
Can someone help? Thanks!
The text was updated successfully, but these errors were encountered: