swagger-api / swagger-api/swagger-codegen-generators
[Python] Client generator incomplete
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 299
- Forks
- 439
- PR merge metrics
- No merged PRs in 30d
Description
Good Day,
i am currently trying to use the generated python-client but it seems the client is incomplete and/or incorrect. I generated the client with the docker image version 3.0.24 (i also generated the client with the version 3.0.25 and run a diff on the client but there where no changes)
For one this issue is related to the Issue #878
For me i couldn't get the client to work without changing every models constructor like i mentioned in the Issue. (I only changed the constructors of the models i testet not every single one)
The next thing is also related to the models. The generator created around 2100 models/classes, some of them are counted up (i have 345 different models named inline_response200-inline_response200344). The different models for the different routes make sense, but with a total of 2187 classes it is fairly difficult to check what the actual problem is. The shop has (at least defined in the spec) 230 different endpoints/routes.
Since this is my first time using/generating a client for a rest api i have no idea what to expect from the generator or how i could check if the specs is the problem.
It seems @HugoMario you are involved to some degree with the python client generator (i found some Issues and pull-requests you approved) maybe you can help me.
I also noticed that there are no tests for the python client generator so i was wondering if anyone is currently using a python client.
Here is the OpenAPI v3 spec i used (since it is ~75.000 lines long i didn't included it directly):
swagger.zip
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the generated Python client with the attached OpenAPI v3 specification and Docker image versions 3.0.24 and 3.0.25. Compare the generated model constructors and the inline_response200 classes, then check whether the specification or generator causes the incomplete client. Define done as a reproducible diagnosis with focused generator tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, openapi, python
- Domain
- api, testing, tooling
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100