Skip to content

pydantic 2.5.3 / 2.0 errors when attempting to generate valid spesification #914

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

Closed
AsgeirNoM opened this issue Dec 22, 2023 · 2 comments
Closed

Comments

@AsgeirNoM
Copy link

Describe the bug
Generating the the (valid) eGauge WebAPI schema that can be downloaded from here ouputs the following error:

Error(s) encountered while generating, client was not created
Failed to parse OpenAPI document
29 validation errors for OpenAPI
...

The schema is valid when using https://editor-next.swagger.io and a (python) client can be generate on the site.

OpenAPI Spec File
eGauge_openapi.json please note the Common Documentation License 1.0.

Desktop (please complete the following information):

  • OS: Windows with Ubuntu Subsystem + Debian [two different physical systems]
  • Python Version: 3.9.2 and 3.10.12
  • openapi-python-client version 0.16.0

Additional context
generate_eGauge_errors.txt

Reverting to pydantic 2.0 does nothing for the errors.
pydantic 1.x doesn't work with openapi-python-client, but the errors reminds me of issues I had when migrating from pydatic v1 to v2.

@AsgeirNoM
Copy link
Author

Looking though the entire output I realized that even though the openapi-python-client documentation says Generate modern Python clients from OpenAPI 3.x documents. the last validation error is against the openAPI version number 3.1.0.

@dbanty
Copy link
Collaborator

dbanty commented Dec 22, 2023

Yes, 3.1 is not yet supported in any release. There is a work-in-progress branch in #856

@dbanty dbanty closed this as not planned Won't fix, can't repro, duplicate, stale Dec 22, 2023
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

2 participants