Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Override examples/enums for struct fields #1951

Open
boindil opened this issue Dec 20, 2024 · 0 comments
Open

Override examples/enums for struct fields #1951

boindil opened this issue Dec 20, 2024 · 0 comments

Comments

@boindil
Copy link

boindil commented Dec 20, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant