docs: Merge error description for the same status code (#5911)

This commit is contained in:
Olivier 'reivilibre
2026-08-27 14:57:32 +01:00
committed by GitHub
2 changed files with 2 additions and 6 deletions
+1 -5
View File
@@ -125,13 +125,9 @@ pub fn doc(operation: TransformOperation) -> TransformOperation {
let response = ErrorResponse::from_error(&RouteError::UsernameNotValid);
t.description("Username is not valid").example(response)
})
.response_with::<409, RouteError, _>(|t| {
let response = ErrorResponse::from_error(&RouteError::UserAlreadyExists);
t.description("User already exists").example(response)
})
.response_with::<409, RouteError, _>(|t| {
let response = ErrorResponse::from_error(&RouteError::UsernameReserved);
t.description("Username is reserved by the homeserver")
t.description("User already exists or the username is reserved by the homeserver")
.example(response)
})
}
+1 -1
View File
@@ -2310,7 +2310,7 @@
}
},
"409": {
"description": "Username is reserved by the homeserver",
"description": "User already exists or the username is reserved by the homeserver",
"content": {
"application/json": {
"schema": {