|
| 1 | +nelmio_api_doc: |
| 2 | + documentation: |
| 3 | + components: |
| 4 | + responses: |
| 5 | + InvalidRequestProblemDetailsResponse: |
| 6 | + description: RFC7807 Problem Details |
| 7 | + content: |
| 8 | + application/problem+json: |
| 9 | + schema: |
| 10 | + anyOf: |
| 11 | + - $ref: '#/components/schemas/ProblemDetailsInvalidRequestBody' |
| 12 | + - $ref: '#/components/schemas/ProblemDetails' |
| 13 | + examples: |
| 14 | + invalidJsonInRequestBody: |
| 15 | + summary: Invalid JSON in Request Body |
| 16 | + value: |
| 17 | + type: 'about:blank' |
| 18 | + title: 'The request body contains errors' |
| 19 | + status: 400 |
| 20 | + detail: 'Validation failed.' |
| 21 | + violations: |
| 22 | + - propertyPath: 'foo' |
| 23 | + message: 'This value should not be blank.' |
| 24 | + code: c1ac8c7d-eab5-458f-a950-fcf121d23059 |
| 25 | + constraint: NotBlank |
| 26 | + error: "NOT_EQUAL_ERROR" |
| 27 | + invalidRequestBody: |
| 28 | + summary: Invalid Request Body |
| 29 | + value: |
| 30 | + type: 'about:blank' |
| 31 | + title: 'The request body contains errors' |
| 32 | + status: 400 |
| 33 | + detail: 'Body does not match schema' |
| 34 | + violations: |
| 35 | + - propertyPath: 'body' |
| 36 | + message: 'Body does not match schema for content-type "application/json" for Request [post /api/example]' |
| 37 | + code: 'openapi_request_validation' |
| 38 | + constraint: 'openapi_request_validation' |
| 39 | + UnauthorizedProblemDetailsResponse: |
| 40 | + description: RFC7807 Unauthorized Problem Details |
| 41 | + content: |
| 42 | + application/problem+json: |
| 43 | + schema: |
| 44 | + $ref: '#/components/schemas/ProblemDetails' |
| 45 | + example: |
| 46 | + type: 'about:blank' |
| 47 | + title: 'Unauthorized' |
| 48 | + status: 401 |
| 49 | + detail: 'The authentication token is missing or invalid.' |
| 50 | + ForbiddenProblemDetailsResponse: |
| 51 | + description: RFC7807 Forbidden Problem Details |
| 52 | + content: |
| 53 | + application/problem+json: |
| 54 | + schema: |
| 55 | + $ref: '#/components/schemas/ProblemDetails' |
| 56 | + example: |
| 57 | + type: 'about:blank' |
| 58 | + title: 'Forbidden' |
| 59 | + status: 403 |
| 60 | + detail: 'You are not allowed to perform this action.' |
| 61 | + ResourceNotFoundProblemDetailsResponse: |
| 62 | + description: RFC7807 Resource Not Found Problem Details |
| 63 | + content: |
| 64 | + application/problem+json: |
| 65 | + schema: |
| 66 | + $ref: '#/components/schemas/ProblemDetails' |
| 67 | + example: |
| 68 | + type: 'about:blank' |
| 69 | + title: 'Resource Not Found' |
| 70 | + status: 404 |
| 71 | + detail: 'The requested resource was not found.' |
| 72 | + ConflictProblemDetailsResponse: |
| 73 | + description: RFC7807 Conflict Problem Details |
| 74 | + content: |
| 75 | + application/problem+json: |
| 76 | + schema: |
| 77 | + $ref: '#/components/schemas/ProblemDetails' |
| 78 | + example: |
| 79 | + type: 'about:blank' |
| 80 | + title: 'Conflict' |
| 81 | + status: 409 |
| 82 | + detail: 'The resource already exists.' |
| 83 | + DefaultProblemDetailsResponse: |
| 84 | + description: RFC7807 Default Problem Details |
| 85 | + content: |
| 86 | + application/problem+json: |
| 87 | + schema: |
| 88 | + $ref: '#/components/schemas/ProblemDetails' |
| 89 | + example: |
| 90 | + type: 'about:blank' |
| 91 | + title: 'An error occurred' |
| 92 | + status: 500 |
0 commit comments