Skip to content

[REQ] Support for custom types based on format field #2730

@steco

Description

@steco

Description

OpenApi-Gen currently supports the following hard-coded "format"s for a string parameter

  • uuid
  • binary
  • email
  • date
  • date-time
  • byte-array
  • binary

I'd like to make this more generic, ie support additional values for the "format" field and use a type-mapping parameter to map them to a specific type in the generated code. As per https://swagger.io/specification/#dataTypes:

the format property is an open string-valued property, and can have any value. Formats such as "email", "uuid", and so on, MAY be used even though undefined by this specification

This commit is the change to support this. Is this an appropriate change to make ?

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