forked from loafle/openapi-generator-original
* python: adjust basic typing information This is an initial pass to fix and adjust the typing information for the generated client. This is enough to have mypy runnning without complains on all the (modern) generated clients (Pydantic v1 code is not checked for instance) mypy is also now run directly in the CI, so further changes will also be checked and thus, will need to be compliant with good typing information. Note that this doesn't *fully* type all the code: mypy is not run in "strict" mode and there are still many functions/methods/attributes which are still not fully typed, but it's a first good step in that direction. * ApiResponse's raw_data can't be None * Fix indentation * Revert test changes * run mypy on tests/ directory * don't forcefully convert the client response headers to dict * override petstore ApiResponse model * adjust type of 'any/one_of_schemas' fields
15 lines
547 B
YAML
15 lines
547 B
YAML
generatorName: python
|
|
outputDir: samples/openapi3/client/petstore/python-aiohttp
|
|
inputSpec: modules/openapi-generator/src/test/resources/3_0/python/petstore-with-fake-endpoints-models-for-testing.yaml
|
|
templateDir: modules/openapi-generator/src/main/resources/python
|
|
library: asyncio
|
|
additionalProperties:
|
|
packageName: petstore_api
|
|
mapNumberTo: float
|
|
nameMappings:
|
|
_type: underscore_type
|
|
type_: type_with_underscore
|
|
modelNameMappings:
|
|
# The OpenAPI spec ApiResponse conflicts with the internal ApiResponse
|
|
ApiResponse: ModelApiResponse
|