Override default special chars replacement
Created by: deimosfr
Is your feature request related to a problem? Please describe.
I'm using openapi generator to generate a Rust library from Scaleway Cloud provider OpenAPI spec (https://github.com/Qovery/scaleway-api-rs). When I generate the API, the naming does not respect the spec because of replaced chars.
Example, the spec starts with:
...
components:
schemas:
google.protobuf.UInt32Value:
type: integer
nullable: true
scaleway.k8s.v1.CNI:
type: string
enum:
- unknown_cni
- cilium
- calico
- weave
- flannel
- kilo
default: unknown_cni
scaleway.k8s.v1.Cluster:
...
Here scaleway.k8s.v1.CNI
, when generated becomes:
pub use self::scaleway_period_k8s_period_v1_period_cni::ScalewayPeriodK8sPeriodV1PeriodCni;
As you can see Period
and _period_
are replacing the dots everywhere https://docs.rs/scaleway_api_rs/latest/scaleway_api_rs/models/index.html
Describe the solution you'd like
It would be great to have a way to override default special chars override https://github.com/OpenAPITools/openapi-generator/blob/68b944e6e62fa69669e97a8c2041a7eb7ed3314a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java#L1820 to avoid this behavior.
I may have missed something, and there is something simple to achieve this, so feel free to tell me.
What do you think?
Thanks