Skip to content
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

overriding model property with more specific object type doesn't work #1123

Open
eli-bl opened this issue Sep 17, 2024 · 0 comments · May be fixed by #1159
Open

overriding model property with more specific object type doesn't work #1123

eli-bl opened this issue Sep 17, 2024 · 0 comments · May be fixed by #1159

Comments

@eli-bl
Copy link
Collaborator

eli-bl commented Sep 17, 2024

Describe the bug
When an object schema derives from another object schema using allOf, and redeclares a property that had an object type to use a different object type, the generated code uses the old type for that property.

OpenAPI Spec File
https://gist.github.com/eli-bl/d5658d6714e1c9ef544ef1fc8902960a

With this example, the type of SpecialTask.result in the generated code should be SpecialTaskOutputData. Instead it is being declared as BaseTaskResult, the same as BaseTask.result.

Desktop (please complete the following information):

  • OS: macOS 14.5
  • Python Version: 3.8.15
  • openapi-python-client version: 0.21.5
@eli-bl eli-bl linked a pull request Nov 5, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant