Skip to content

Commit

Permalink
Remove XML from swagger descriptions.
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTedder committed Jun 24, 2024
1 parent 4c2eb64 commit a0b7260
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions LeaderboardBackend/Controllers/AccountController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public AccountController(IUserService userService)
[SwaggerResponse(
409,
"""
A `User` with the specified username or email already exists.<br/><br/>
A `User` with the specified username or email already exists.
Validation error codes by property:
- **Username**:
- **UsernameTaken**: the username is already in use
Expand All @@ -44,7 +44,7 @@ public AccountController(IUserService userService)
[SwaggerResponse(
422,
"""
The request contains errors.<br/><br/>
The request contains errors.
Validation error codes by property:
- **Username**:
- **UsernameFormat**: Invalid username format
Expand Down Expand Up @@ -114,7 +114,7 @@ [FromServices] IAccountConfirmationService confirmationService
[SwaggerResponse(
422,
"""
The request contains errors.<br/><br/>
The request contains errors.
Validation error codes by property:
- **Password**:
- **NotEmptyValidator**: No password was passed
Expand Down Expand Up @@ -259,7 +259,7 @@ [FromServices] IAccountRecoveryService recoveryService
[SwaggerResponse(
422,
"""
The request body contains errors.<br/>
The request body contains errors.
A **PasswordFormat** Validation error on the Password field indicates that the password format is invalid.
""",
typeof(ValidationProblemDetails)
Expand Down
2 changes: 1 addition & 1 deletion LeaderboardBackend/Controllers/UsersController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public async Task<ActionResult<UserViewModel>> GetUserById(
"Gets the currently logged-in User.",
"""
Call this method with the 'Authorization' header. A valid JWT bearer token must be
passed.<br/>
passed.
Example: `{ 'Authorization': 'Bearer JWT' }`.
"""
)]
Expand Down
10 changes: 5 additions & 5 deletions LeaderboardBackend/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"description": "The request was malformed."
},
"409": {
"description": "A `User` with the specified username or email already exists.<br/><br/>\nValidation error codes by property:\n- **Username**:\n - **UsernameTaken**: the username is already in use\n- **Email**:\n - **EmailAlreadyUsed**: the email is already in use",
"description": "A `User` with the specified username or email already exists.\nValidation error codes by property:\n- **Username**:\n - **UsernameTaken**: the username is already in use\n- **Email**:\n - **EmailAlreadyUsed**: the email is already in use",
"content": {
"application/json": {
"schema": {
Expand All @@ -47,7 +47,7 @@
}
},
"422": {
"description": "The request contains errors.<br/><br/>\nValidation error codes by property:\n- **Username**:\n - **UsernameFormat**: Invalid username format\n- **Password**:\n - **PasswordFormat**: Invalid password format\n- **Email**:\n - **EmailValidator**: Invalid email format",
"description": "The request contains errors.\nValidation error codes by property:\n- **Username**:\n - **UsernameFormat**: Invalid username format\n- **Password**:\n - **PasswordFormat**: Invalid password format\n- **Email**:\n - **EmailValidator**: Invalid email format",
"content": {
"application/json": {
"schema": {
Expand Down Expand Up @@ -103,7 +103,7 @@
"description": "No `User` with the requested details could be found."
},
"422": {
"description": "The request contains errors.<br/><br/>\nValidation error codes by property:\n- **Password**:\n - **NotEmptyValidator**: No password was passed\n - **PasswordFormat**: Invalid password format\n- **Email**:\n - **NotNullValidator**: No email was passed\n - **EmailValidator**: Invalid email format",
"description": "The request contains errors.\nValidation error codes by property:\n- **Password**:\n - **NotEmptyValidator**: No password was passed\n - **PasswordFormat**: Invalid password format\n- **Email**:\n - **NotNullValidator**: No email was passed\n - **EmailValidator**: Invalid email format",
"content": {
"application/json": {
"schema": {
Expand Down Expand Up @@ -275,7 +275,7 @@
"description": "The new password is the same as the user's existing password."
},
"422": {
"description": "The request body contains errors.<br/>\nA **PasswordFormat** Validation error on the Password field indicates that the password format is invalid.",
"description": "The request body contains errors.\nA **PasswordFormat** Validation error on the Password field indicates that the password format is invalid.",
"content": {
"application/json": {
"schema": {
Expand Down Expand Up @@ -913,7 +913,7 @@
"Users"
],
"summary": "Gets the currently logged-in User.",
"description": "Call this method with the 'Authorization' header. A valid JWT bearer token must be\npassed.<br/>\nExample: `{ 'Authorization': 'Bearer JWT' }`.",
"description": "Call this method with the 'Authorization' header. A valid JWT bearer token must be\npassed.\nExample: `{ 'Authorization': 'Bearer JWT' }`.",
"responses": {
"200": {
"description": "The `User` was found and returned successfully.",
Expand Down

0 comments on commit a0b7260

Please sign in to comment.