Files
lincodex/api/core/components/examples.yml
T

141 lines
4.6 KiB
YAML

ValidationFailed:
summary: Request parameters do not match the contract
value:
type: urn:lincodex:problem:validation_failed
title: Request validation failed
status: 400
code: validation_failed
detail: One or more request fields are invalid.
trace_id: 0b6f6f0e-7c55-4c8f-a8d1-6f3f3b8f2a10
errors:
- in: query
pointer: /limit
code: invalid
message: The value does not match the contract.
- in: header
pointer: /Idempotency-Key
code: required
message: The value is required.
Unauthenticated:
summary: No valid session
value:
type: urn:lincodex:problem:unauthenticated
title: Authentication required
status: 401
code: unauthenticated
detail: Sign in and repeat the request.
trace_id: 4f2d1c3b-6a5e-4d7f-8b9a-0c1d2e3f4a5b
Forbidden:
summary: The caller may not access the object
value:
type: urn:lincodex:problem:forbidden
title: Access denied
status: 403
code: forbidden
detail: You do not have permission to perform this operation.
trace_id: 7a8b9c0d-1e2f-4a3b-8c4d-5e6f7a8b9c0d
NotFound:
summary: Unknown route or invisible object
value:
type: urn:lincodex:problem:not_found
title: Resource not found
status: 404
code: not_found
detail: The requested resource does not exist.
trace_id: 1c2d3e4f-5a6b-4c7d-8e9f-0a1b2c3d4e5f
IdempotencyInProgress:
summary: The first request with this key is still running
value:
type: urn:lincodex:problem:idempotency_in_progress
title: Request with this idempotency key is in progress
status: 409
code: idempotency_in_progress
detail: Retry after the original request completes.
trace_id: 2d3e4f5a-6b7c-4d8e-9f0a-1b2c3d4e5f6a
StateConflict:
summary: The resource state does not allow the operation
value:
type: urn:lincodex:problem:state_conflict
title: Resource state conflict
status: 409
code: state_conflict
detail: The resource is in a state that does not allow this operation.
trace_id: 1e2f3a4b-5c6d-4e7f-8a9b-0c1d2e3f4a5b
DomainValidationFailed:
summary: The body violates a domain rule
value:
type: urn:lincodex:problem:validation_failed
title: Request validation failed
status: 400
code: validation_failed
detail: One or more request fields are invalid.
trace_id: 2f3a4b5c-6d7e-4f8a-9b0c-1d2e3f4a5b6c
errors:
- in: body
pointer: /salary_from
code: invalid
message: The value does not match the contract.
VersionConflict:
summary: If-Match does not match the current version
value:
type: urn:lincodex:problem:version_conflict
title: Resource version conflict
status: 412
code: version_conflict
detail: The resource changed after it was read. Read it again before retrying.
trace_id: 3e4f5a6b-7c8d-4e9f-8a0b-2c3d4e5f6a7b
PayloadTooLarge:
summary: The request body exceeds the limit
value:
type: urn:lincodex:problem:payload_too_large
title: Request body too large
status: 413
code: payload_too_large
detail: Reduce the request body size and retry.
trace_id: 8b9c0d1e-2f3a-4b4c-9d5e-6f7a8b9c0d1e
IdempotencyKeyReused:
summary: The same Idempotency-Key was sent with a different body
value:
type: urn:lincodex:problem:idempotency_key_reused
title: Idempotency key reused with a different request
status: 422
code: idempotency_key_reused
detail: Use a new Idempotency-Key for a different request.
trace_id: 4f5a6b7c-8d9e-4f0a-9b1c-3d4e5f6a7b8c
PreconditionRequired:
summary: The operation requires If-Match
value:
type: urn:lincodex:problem:precondition_required
title: Precondition required
status: 428
code: precondition_required
detail: Send If-Match with the ETag of the version you read.
trace_id: 5a6b7c8d-9e0f-4a1b-8c2d-4e5f6a7b8c9d
RateLimited:
summary: Too many requests
value:
type: urn:lincodex:problem:rate_limited
title: Too many requests
status: 429
code: rate_limited
detail: Wait for the Retry-After interval and retry.
trace_id: 6b7c8d9e-0f1a-4b2c-9d3e-5f6a7b8c9d0e
Internal:
summary: Unexpected server error
value:
type: urn:lincodex:problem:internal
title: Internal server error
status: 500
code: internal
detail: The server could not complete the request.
trace_id: 9c0d1e2f-3a4b-4c5d-8e6f-7a8b9c0d1e2f
NotImplemented:
summary: Operation declared in the contract without an implementation
value:
type: urn:lincodex:problem:not_implemented
title: Operation not implemented
status: 501
code: not_implemented
detail: This operation is not available yet.
trace_id: 0d1e2f3a-4b5c-4d6e-9f7a-8b9c0d1e2f3a