openapi-generator icon indicating copy to clipboard operation
openapi-generator copied to clipboard

[REQ] "/" in value

Open theycallmehero opened this issue 1 year ago • 1 comments

Issue with / in value

  @derive Jason.Encoder
  defstruct [
    :hate,
    :"hate/threatening",

Please recommend, what would be recommend way of fixing, so that decode would work nice?

I think --additional-properties=sanitizeModelPropertyNames=true \ would help, but then decode on those responses would error?

Should the transformation happen in or before the code, so it would not error out?

@wing328

theycallmehero avatar Oct 14 '24 13:10 theycallmehero

https://github.com/OpenAPITools/openapi-generator/blob/3b3f9a770a50240a53a7c0f59c98f4b7f9bad4be/modules/openapi-generator/src/main/resources/elixir/model.mustache#L7

Related template

theycallmehero avatar Oct 15 '24 13:10 theycallmehero