Skip to content

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

@AsgeirNoM

Description

@AsgeirNoM

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions