Skip to content

[Question] [python-fastapi] How to set _spec_property_naming = True via command line #11604

@puneetugru

Description

@puneetugru
Description

We have a requirement where we would like to generate only the model files, inheriting from pydantic BaseModel.

Hence, we would like to use python-fastapi as the generator type.

But, we would also like the openapi-generator to NOT generate model names with snake_case, but rather with camelCase.

As per #10458 the support exists as part of the python-experimental generator.

But, the same is failing due to #11518

But, is there a way to set _spec_property_naming = True as a command-line argument with the generator set as python-fastapi?

openapi-generator version
openapi-generator --version
openapi-generator-cli 5.4.0
  commit : 4a36be7
  built  : 2022-01-31T05:31:36Z
  source : https://github.com/openapitools/openapi-generator
  docs   : https://openapi-generator.tech/

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions