Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option capitalize-enum-members in pyproject.toml is ignored #2072

Open
chuckwondo opened this issue Aug 15, 2024 · 0 comments
Open

Option capitalize-enum-members in pyproject.toml is ignored #2072

chuckwondo opened this issue Aug 15, 2024 · 0 comments

Comments

@chuckwondo
Copy link

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant