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

[REQ] [Question] [Swift6] Generating Codable Models without CodingKeys and encode(to:) method

Open georgiosantoniadis opened this issue 2 months ago • 0 comments

Is your feature request related to a problem? Please describe.

I have a spec.yaml file with an object having two date attributes, but with a different format (once "yyyy-MM-dd" and once "yyyy-MM-dd'T'HH:mm:ss"). I handle this case by writing a custom encode(to:) method.

By using the Swift6 generator, it always overwrites this method, and I have to intervene manually.

Describe the solution you'd like

I read the documentation, but I did not find a way to generate the models without the encode(to:) method. Maybe there is already a way to do it? Else, would it make sense to include such an option?

georgiosantoniadis avatar Dec 03 '25 07:12 georgiosantoniadis