Skip to content
This repository has been archived by the owner on Nov 13, 2021. It is now read-only.

Include validation errors in swagger documentation? #111

Open
pietersap opened this issue Mar 19, 2019 · 3 comments
Open

Include validation errors in swagger documentation? #111

pietersap opened this issue Mar 19, 2019 · 3 comments
Assignees

Comments

@pietersap
Copy link
Contributor

Each controller can also return a validation error, status code 400. Should we also include this in the swagger documentation, for completeness? In a similar way that the OK200 and ERROR500 status codes are documented here below.

        [HttpGet(Name = Constants.RouteNames.v1.GetCustomizations)]
        [SwaggerResponse((int)HttpStatusCode.OK, "List of players")]
        [SwaggerResponse((int)HttpStatusCode.InternalServerError, "API is not available")]
        public async Task<IActionResult> GetCustomizations()
@fgheysels
Copy link
Contributor

Imo, yes.

@MassimoC
Copy link
Collaborator

probably we should update the guidance of the Level 1 saying that for every implemented status code, a swagger response attribute should be added.

@pietersap
Copy link
Contributor Author

Agreed

tomkerkhove pushed a commit that referenced this issue Sep 2, 2019
* #111 statuscode 400 in swagger and update guideline

* update readme

* update readme
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants