-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Closed
Labels
Description
Bug Report Checklist
- Have you provided a full/minimal spec to reproduce the issue?
- Have you validated the input using an OpenAPI validator (example)?
- Have you tested with the latest master to confirm the issue still exists?
- Have you searched for related issues/PRs?
- What's the actual output vs expected output?
- [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
When building openapi schema that use kebab case in path parameters (ie. /v1/pet/pet-id) the Rust client does not compile
86 | ... let local_var_uri_str = format!("{}/pet/{pet-id}", local_var_configuration.base_path, pet-id=pet_id);
| - ^ expected `'}'` in format string
| |
| because of this opening brace
openapi-generator version
> openapi-generator-cli version
7.10.0
OpenAPI declaration file content or url
https://gist.github.com/ranger-ross/c2f6fd836c5bb3196c5d9c18eff712f4
Generation Details
generatorName: rust
library: reqwest-trait
additionalProperties:
supportMiddleware: true
preferUnsignedInt: true
topLevelApiClient: true
useBonBuilder: true
mockall: trueSteps to reproduce
- generate the client using the schema and config provided above.
- cd to the output directory and run
cargo build
Related issues/PRs
none
Suggest a fix
I believe that params should be normalized to underscore_snake_case to avoid compilation issues.
Reactions are currently unavailable