OpenAPITools / OpenAPITools/openapi-generator
[REQ] Generated python code should be checked with `mypy --strict` - currently only tested with `mypy`
Open
Beginner friendly
Nobody has claimed this yet.
Enhancement: Feature
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
TLDR
Currently generated code is run through mypy but with a fairly loose configuration. Generated code would be significantly better, if it were validated with a strict type-checker.
Describe the solution you'd like
Apply this patch here:
- name: mypy
working-directory: ${{ matrix.sample }}
+ run: python -m mypy --strict
- run: python -m mypy
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
Open .github/workflows/samples-python-client-echo-api.yaml around the existing mypy step and review how the sample matrix invokes it. Update the validation to use strict checking, then run the affected workflow or equivalent sample checks and confirm generated Python clients pass mypy --strict.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, python
- Domain
- ci-cd, testing
- Issue type
- Feature
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100