You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The replace("_", "") alters the name of the tag which is used to figure out the type of enums and makes it incompatible with the api which implements the openapi spec.
Bug Report Checklist
Description
The rust generator contains this piece of code
openapi-generator/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustClientCodegen.java
Lines 243 to 246 in cb20e74
The
replace("_", "")
alters the name of the tag which is used to figure out the type of enums and makes it incompatible with the api which implements the openapi spec.Here an example output of the API
Here is what the generator generates
In the second line,
#[serde(tag = "nodetype")]
is wrong, it should be#[serde(tag = "node_type")]
, but it isn't because of the replacement.Here is where mustache inserts the wrong value
openapi-generator/modules/openapi-generator/src/main/resources/rust/model.mustache
Line 44 in cb20e74
openapi-generator version
6.3.0
OpenAPI declaration file content or url
https://github.com/ory/sdk/blob/master/spec/kratos/v0.11.1.json
Generation Details
Steps to reproduce
Related issues/PRs
Suggest a fix
The text was updated successfully, but these errors were encountered: