skoruba / Duende.IdentityServer.Admin

The administration for the Duende IdentityServer and Asp.Net Core Identity ⚡
Apache License 2.0
588 stars 200 forks source link

Api status codes question #247

Open carnahanliam opened 17 hours ago

carnahanliam commented 17 hours ago

Question

My team and I are integrating the Admin UI API into our existing IdentityServer application and I've been working on some integration tests. While writing tests and exploring the Swagger UI, I was getting a bit confused about some of the status codes returned from endpoints since they were different from those described in the Swagger doc.

For example, looking at a PUT request to "/api/Clients" I would expect the possible responses to be 201 and 400 (am I right in thinking the doc/UI response values are based on the response types set in the controllers by the ProducesResponseType attribute?):

image

but I've found a successful PUT returns 200.

Is this a possible area for improvement in the API documentation or am I missing something?

Thanks

skoruba commented 15 hours ago

Hi @carnahanliam - sure, if you have found something, please send me a PR and I will fix it. :)

Thank you for contacting me!