openapi-generator-original/bin/configs/python-lazyImports.yaml
Pascal Bachor 6825d9ccaa
python: feature flag for lazy imports (#21885)
* python: feature flag for lazy imports

* python: update samples

* python: add python-lazyImports to test job

* python: reuse tests in lazyImports sample

* python: avoid using non-imported submodules

* add normalizer option

---------

Co-authored-by: Pascal Bachor <bachorp@users.noreply.github.com>
Co-authored-by: William Cheng <wing328hk@gmail.com>
2025-09-10 17:22:41 +08:00

19 lines
704 B
YAML

generatorName: python
outputDir: samples/openapi3/client/petstore/python-lazyImports
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
additionalProperties:
packageName: petstore_api
useOneOfDiscriminatorLookup: "true"
disallowAdditionalPropertiesIfNotPresent: false
mapNumberTo: StrictFloat
lazyImports: 'true'
nameMappings:
_type: underscore_type
type_: type_with_underscore
modelNameMappings:
# The OpenAPI spec ApiResponse conflicts with the internal ApiResponse
ApiResponse: ModelApiResponse
openapiNormalizer:
SIMPLIFY_ONEOF_ANYOF_ENUM: false