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
@component
@dataclasses.dataclass
class Location:
x: int
y: int
@component
@dataclasses.dataclass
class UserProfile:
name: str
age: int
email: str
location: Location #Path
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:
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:The text was updated successfully, but these errors were encountered: