openapi-generators / openapi-generators/openapi-python-client

Issue with client generation for FastApi version > 118

Open
#1,340 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2k
Forks
293
Avg merge
34m
Merged PRs (30d)
1

Description

Describe the bug
Pydantic V1 and V2 models co-existing is creating an issue with backwards compatibility. Please check the latest changes from fast api viz https://github.com/fastapi/fastapi/pull/14168 which create the models as xxxx-Input and xxxx-Output which is breaking the existing code.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the FastAPI pull request linked in the issue and the generator entry point that processes FastAPI's xxxx-Input and xxxx-Output schemas. Reproduce the client-generation failure with co-existing Pydantic V1 and V2 models, then add regression coverage showing that existing generated code remains compatible while the newer schemas are handled.

Written by the indexing model from the issue text.

Assessment

Tech stack
fastapi, python
Domain
api, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.