Skip to content

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

@georgiosantoniadis

Description

@georgiosantoniadis

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?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions