datamodel-code-generator
datamodel-code-generator copied to clipboard
Option `capitalize-enum-members` in `pyproject.toml` is ignored
Describe the bug
While capitalise-enum-members (with an s) works as described, the alternative spelling, capitalize-enum-members (with a z), is completely ignored when it is specified in a pyproject.toml file. It is not even validated, so even setting it to a non-boolean value does not cause a validation error. Thus, using this option (with a z) does not produce enum member names in all caps. Note, however, that when the alternative spelling is given directly on the command line, it works as expected. Specifying it in pyproject.toml does not work as expected.
To Reproduce
In pyproject.toml:
[tool.datamodel-codegen]
capitalize-enum-members = true
Used commandline:
$ datamodel-codegen --url https://cdn.earthdata.nasa.gov/umm/granule/v1.6.6/umm-g-json-schema.json
Expected behavior
Enum member names should be in all caps.
Version:
- OS: macOS 12.7.6
- Python version: 3.9
- datamodel-code-generator version: 0.25.9