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

Newest Pydantic generates error for some files #1174

Closed
rd-andreas-tollkoetter opened this issue Dec 2, 2024 · 3 comments
Closed

Newest Pydantic generates error for some files #1174

rd-andreas-tollkoetter opened this issue Dec 2, 2024 · 3 comments

Comments

@rd-andreas-tollkoetter
Copy link

Describe the bug
Huge error caused by Pydantic; too huge for my terminal to contain, so I can't copy it here.

PydanticUserError: `Parameter` is not fully defined; you should define `Header`, then call `Parameter.model_rebuild()`.

OpenAPI Spec File
catalog_database_registration_v1.yaml.zip

Desktop (please complete the following information):

  • OS: macOS 14.6
  • Python Version: 3.12.7
  • openapi-python-client version 0.21.7

Additional context
This is new in v0.21.7 and does not happen in v0.21.6.

@rd-andreas-tollkoetter rd-andreas-tollkoetter changed the title v0.21.7 generates error for some files Newest Pydantic generates error for some files Dec 2, 2024
@rd-andreas-tollkoetter
Copy link
Author

After doing some more experiments, I found that this is not caused by openapi-python-client itself but by Pydantic 2.10 (instead of 2.9). So it is unclear whether this is a new feature in Pydantic that now reports some before hidden error, or a bug in Pydantic that will be fixed.

@texhnolyze
Copy link

This is also discussed in: #1171

@dbanty
Copy link
Collaborator

dbanty commented Dec 24, 2024

It was a breaking change in Pydantic. #1176 adapts to it, though

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

No branches or pull requests

3 participants