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

Configuration guide naming.field_casing option doesn't exist #73

Open
thiagomajesk opened this issue Oct 16, 2024 · 0 comments
Open

Configuration guide naming.field_casing option doesn't exist #73

thiagomajesk opened this issue Oct 16, 2024 · 0 comments

Comments

@thiagomajesk
Copy link

thiagomajesk commented Oct 16, 2024

The configuration guide mentions a naming.field_casing option, but this option only works in the root of the configuration default: [field_casing: :snake].

https://github.com/aj-foster/open-api-generator/blob/1a09bae7f6db6ed9f29b3f5dde476e141e4574b0/lib/open_api/processor.ex
https://github.com/aj-foster/open-api-generator/blob/1a09bae7f6db6ed9f29b3f5dde476e141e4574b0/lib/open_api/processor.ex

PS.: I wonder if we can change the default value of this option to snake (I imagine that is what most Elixir users would expect by default).

Update: I also noticed that operations opts keys are not following the defined normalization which is kinda annoying. I'm testing with this spec: https://cloud.langfuse.com/generated/api/openapi.yml and the configuration below:

config :oapi_generator,
    default: [
      field_casing: :snake,
      output: [
        field_casing: :snake,
        base_module: LangfuseSdk.Generated,
        default_client: LangfuseSdk.Support.Client,
        location: "lib/langfuse_sdk",
        operation_subdirectory: "generated/operations/",
        schema_subdirectory: "generated/schemas/"
      ]
    ]
@thiagomajesk thiagomajesk changed the title Configuration guide naming.field_casing doesn't exist Configuration guide naming.field_casing option doesn't exist Oct 16, 2024
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