Skip to content

api_operation error_code field is not a list #182

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

Open
Kek5chen opened this issue Jun 11, 2025 · 5 comments · Fixed by #183
Open

api_operation error_code field is not a list #182

Kek5chen opened this issue Jun 11, 2025 · 5 comments · Fixed by #183
Assignees
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@Kek5chen
Copy link
Contributor

The documentation states: error_code = 00 an optional list of error codes to document only theses

I searched around a lot, but couldn't find any documented case of this field being used as a list, and I just can't seem to figure out how this can be written so it's interpreted as a list. Though, I only briefly flew over the macro definition.

So I either ask, to state that this is merely a singleton field in the documentation, or to expand either the documentation or the examples with how this can actually be used as a list.

Thank you

@rlebran
Copy link
Contributor

rlebran commented Jun 11, 2025

Hi, I will improve the documentation, thanks for the feedback.

@Kek5chen
Copy link
Contributor Author

Oh, now this is interesting. I tried the, now documented, behavior. It didn't result in only the mentioned error codes being documented for the endpoint. I'll test again, but maybe the issue is somewhere else then.

@Kek5chen
Copy link
Contributor Author

How about we keep this issue open in the meantime?

@rlebran rlebran reopened this Jun 12, 2025
@rlebran
Copy link
Contributor

rlebran commented Jun 12, 2025

I will have a look at it !

@rlebran rlebran self-assigned this Jun 12, 2025
@rlebran rlebran added bug Something isn't working documentation Improvements or additions to documentation labels Jun 12, 2025
@rlebran
Copy link
Contributor

rlebran commented Jun 12, 2025

This test actually describe the intended behaviour, are you using apistos 0.x ou 1.x ? If you are using 1.x, are you using the #[get], #[post] ... macros ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants