Documentation for Admin Rest API: Wrong response codes for some API-actions in API-Doc
#30.202 aperta il 6 giu 2024
Metriche repository
- Star
- (34.398 stelle)
- Metriche merge PR
- (Merge medio 6g 19h) (384 PR mergiate in 30 g)
Descrizione
Before reporting an issue
- I have read and understood the above terms for submitting issues, and I understand that my issue may be closed without action if I do not follow them.
Area
docs
Describe the bug
In some PUT actions, an incorrect response code is specified in the documentation. In most cases, 200 is specified, although 204 would be correct. In these cases, the specified datatype always contains <<>>.
As the OpenAPI definition has been generated on the basis of this documentation since Keycloak 24, these deviations also occur here. A client that is generated on the basis of this definition therefore receives a status code that it does not expect.
Tested with NSwag Studio for the generation of a C# client.
Discovered with the function “Update User”: PUT /admin/realms/{realm}/users/{user-id}
Version
24.0.5
Regression
- The issue is a regression
Expected behavior
For each function that has "Response.noContent().build();" as its return value, the documentation should contain response code 204.
Actual behavior
Currently, some functions (mainly PUT and DELETE) contain 200 (OK)
How to Reproduce?
Just compare the response code retrieved from a API call with the code given here: https://www.keycloak.org/docs-api/latest/rest-api/index.html
Anything else?
No response