refactor(api): replace application/json mime type with application/problem+json for any error / problem detail responses
See: https://datatracker.ietf.org/doc/html/rfc7807#section-6.1
This commit is contained in:
		
							parent
							
								
									abafbde740
								
							
						
					
					
						commit
						14e2ed90ac
					
				
					 2 changed files with 62 additions and 62 deletions
				
			
		|  | @ -34,7 +34,7 @@ paths: | |||
|         "500": | ||||
|           description: Internal error | ||||
|           content: | ||||
|             application/json: | ||||
|             application/problem+json: | ||||
|               schema: | ||||
|                 $ref: "#/components/schemas/ProblemDetails" | ||||
|     post: | ||||
|  | @ -58,13 +58,13 @@ paths: | |||
|         "400": | ||||
|           description: Invalid input | ||||
|           content: | ||||
|             application/json: | ||||
|             application/problem+json: | ||||
|               schema: | ||||
|                 $ref: "#/components/schemas/ProblemDetails" | ||||
|         "500": | ||||
|           description: Internal error | ||||
|           content: | ||||
|             application/json: | ||||
|             application/problem+json: | ||||
|               schema: | ||||
|                 $ref: "#/components/schemas/ProblemDetails" | ||||
|   /trainings/{trainingID}: | ||||
|  | @ -93,13 +93,13 @@ paths: | |||
|         "404": | ||||
|           description: Training not found | ||||
|           content: | ||||
|             application/json: | ||||
|             application/problem+json: | ||||
|               schema: | ||||
|                 $ref: "#/components/schemas/ProblemDetails" | ||||
|         "500": | ||||
|           description: Internal error | ||||
|           content: | ||||
|             application/json: | ||||
|             application/problem+json: | ||||
|               schema: | ||||
|                 $ref: "#/components/schemas/ProblemDetails" | ||||
|     put: | ||||
|  | @ -133,19 +133,19 @@ paths: | |||
|         "404": | ||||
|           description: Training not found | ||||
|           content: | ||||
|             application/json: | ||||
|             application/problem+json: | ||||
|               schema: | ||||
|                 $ref: "#/components/schemas/ProblemDetails" | ||||
|         "400": | ||||
|           description: Invalid input | ||||
|           content: | ||||
|             application/json: | ||||
|             application/problem+json: | ||||
|               schema: | ||||
|                 $ref: "#/components/schemas/ProblemDetails" | ||||
|         "500": | ||||
|           description: Internal error | ||||
|           content: | ||||
|             application/json: | ||||
|             application/problem+json: | ||||
|               schema: | ||||
|                 $ref: "#/components/schemas/ProblemDetails" | ||||
| 
 | ||||
|  | @ -170,13 +170,13 @@ paths: | |||
|         "404": | ||||
|           description: Training not found | ||||
|           content: | ||||
|             application/json: | ||||
|             application/problem+json: | ||||
|               schema: | ||||
|                 $ref: "#/components/schemas/ProblemDetails" | ||||
|         "500": | ||||
|           description: Internal error | ||||
|           content: | ||||
|             application/json: | ||||
|             application/problem+json: | ||||
|               schema: | ||||
|                 $ref: "#/components/schemas/ProblemDetails" | ||||
| 
 | ||||
|  | @ -208,7 +208,7 @@ paths: | |||
|         "500": | ||||
|           description: Internal error | ||||
|           content: | ||||
|             application/json: | ||||
|             application/problem+json: | ||||
|               schema: | ||||
|                 $ref: "#/components/schemas/ProblemDetails" | ||||
| 
 | ||||
|  | @ -243,13 +243,13 @@ paths: | |||
|         "409": | ||||
|           description: Date already exists | ||||
|           content: | ||||
|             application/json: | ||||
|             application/problem+json: | ||||
|               schema: | ||||
|                 $ref: "#/components/schemas/ProblemDetails" | ||||
|         "500": | ||||
|           description: Internal error | ||||
|           content: | ||||
|             application/json: | ||||
|             application/problem+json: | ||||
|               schema: | ||||
|                 $ref: "#/components/schemas/ProblemDetails" | ||||
| 
 | ||||
|  | @ -284,13 +284,13 @@ paths: | |||
|         "404": | ||||
|           description: Date not found | ||||
|           content: | ||||
|             application/json: | ||||
|             application/problem+json: | ||||
|               schema: | ||||
|                 $ref: "#/components/schemas/ProblemDetails" | ||||
|         "500": | ||||
|           description: Internal error | ||||
|           content: | ||||
|             application/json: | ||||
|             application/problem+json: | ||||
|               schema: | ||||
|                 $ref: "#/components/schemas/ProblemDetails" | ||||
|     put: | ||||
|  | @ -327,25 +327,25 @@ paths: | |||
|         "200": | ||||
|           description: Date updated | ||||
|           content: | ||||
|             application/json: | ||||
|             application/problem+json: | ||||
|               schema: | ||||
|                 $ref: "#/components/schemas/TrainingDate" | ||||
|         "404": | ||||
|           description: Date not found | ||||
|           content: | ||||
|             application/json: | ||||
|             application/problem+json: | ||||
|               schema: | ||||
|                 $ref: "#/components/schemas/ProblemDetails" | ||||
|         "400": | ||||
|           description: Invalid input | ||||
|           content: | ||||
|             application/json: | ||||
|             application/problem+json: | ||||
|               schema: | ||||
|                 $ref: "#/components/schemas/ProblemDetails" | ||||
|         "500": | ||||
|           description: Internal error | ||||
|           content: | ||||
|             application/json: | ||||
|             application/problem+json: | ||||
|               schema: | ||||
|                 $ref: "#/components/schemas/ProblemDetails" | ||||
| 
 | ||||
|  | @ -386,7 +386,7 @@ paths: | |||
|         "500": | ||||
|           description: Internal error | ||||
|           content: | ||||
|             application/json: | ||||
|             application/problem+json: | ||||
|               schema: | ||||
|                 $ref: "#/components/schemas/ProblemDetails" | ||||
| 
 | ||||
|  | @ -424,13 +424,13 @@ paths: | |||
|         "409": | ||||
|           description: Attendee already exists (attendee already registered for this date) | ||||
|           content: | ||||
|             application/json: | ||||
|             application/problem+json: | ||||
|               schema: | ||||
|                 $ref: "#/components/schemas/ProblemDetails" | ||||
|         "500": | ||||
|           description: Internal error | ||||
|           content: | ||||
|             application/json: | ||||
|             application/problem+json: | ||||
|               schema: | ||||
|                 $ref: "#/components/schemas/ProblemDetails" | ||||
| 
 | ||||
|  | @ -474,13 +474,13 @@ paths: | |||
|         "404": | ||||
|           description: Attendee not found | ||||
|           content: | ||||
|             application/json: | ||||
|             application/problem+json: | ||||
|               schema: | ||||
|                 $ref: "#/components/schemas/ProblemDetails" | ||||
|         "500": | ||||
|           description: Internal error | ||||
|           content: | ||||
|             application/json: | ||||
|             application/problem+json: | ||||
|               schema: | ||||
|                 $ref: "#/components/schemas/ProblemDetails" | ||||
| 
 | ||||
|  | @ -534,13 +534,13 @@ paths: | |||
|         "409": | ||||
|           description: Feedback already submitted | ||||
|           content: | ||||
|             application/json: | ||||
|             application/problem+json: | ||||
|               schema: | ||||
|                 $ref: "#/components/schemas/ProblemDetails" | ||||
|         "500": | ||||
|           description: Internal error | ||||
|           content: | ||||
|             application/json: | ||||
|             application/problem+json: | ||||
|               schema: | ||||
|                 $ref: "#/components/schemas/ProblemDetails" | ||||
| 
 | ||||
|  | @ -581,7 +581,7 @@ paths: | |||
|         "500": | ||||
|           description: Internal error | ||||
|           content: | ||||
|             application/json: | ||||
|             application/problem+json: | ||||
|               schema: | ||||
|                 $ref: "#/components/schemas/ProblemDetails" | ||||
| 
 | ||||
|  | @ -613,7 +613,7 @@ paths: | |||
|         "500": | ||||
|           description: Internal error | ||||
|           content: | ||||
|             application/json: | ||||
|             application/problem+json: | ||||
|               schema: | ||||
|                 $ref: "#/components/schemas/ProblemDetails" | ||||
| 
 | ||||
|  | @ -660,7 +660,7 @@ paths: | |||
|         "500": | ||||
|           description: Internal error | ||||
|           content: | ||||
|             application/json: | ||||
|             application/problem+json: | ||||
|               schema: | ||||
|                 $ref: "#/components/schemas/ProblemDetails" | ||||
| components: | ||||
|  |  | |||
		Reference in a new issue