-
-
Notifications
You must be signed in to change notification settings - Fork 35
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] Doubly defined objects in the output specification #260 #245
Comments
Similarly: sanic-org/sanic-openapi#259
...
This is failing due to:
It similarly fails without recursion:
...
There's really no need for sanic to inspect property return types to discover model attributes. Dataclasses, Pydantic or type annotations on the class constructor all provide what is needed. |
I have a fix both, do you want a PR? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When we have:
Location is define twice in the output schema. Once in components, once again within UserProfile.
This is deeply problematic for code generators which depend on generating a single class for both. ( openapi-generator-cli, for example, produces two Location classes and one cannot be used where the other is used).
UserProfile should have a ref to Location and Location should be added as a component whether or not it has the
@component
decorator:ref: sanic-org/sanic-openapi#260
The text was updated successfully, but these errors were encountered: