Skip to content

Override examples/enums for struct fields #1951

@boindil

Description

@boindil

Is your feature request related to a problem? Please describe.
We have an api, where theres a field called code. this field contains a code related to the current error occurring. Since the response struct always has the same base, we only defined it once and use it for everything like so: // @Failure 400 {object} responses.HttpResponseBase. Obviously different routes produce different error codes.

Describe the solution you'd like
Since I did not find any documentation, I guess its currently not possible to override examples/enums of a response struct. I did only see the possibility to override the type. Thats what I am suggesting here.

Describe alternatives you've considered
lots and lots of different response structs - meh

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions