172 lines
5.9 KiB
YAML
172 lines
5.9 KiB
YAML
Timestamp:
|
|
type: string
|
|
format: date-time
|
|
description: UTC instant in RFC 3339 format with the Z suffix, for example 2026-10-05T09:30:00Z. Servers always emit UTC. Every date-time field in this contract uses this schema.
|
|
examples:
|
|
- '2026-10-05T09:30:00Z'
|
|
PageInfo:
|
|
type: object
|
|
description: Cursor pagination state of a list response. Lists are ordered by a stable server-defined key. To read the next page, repeat the request with the same filters and `cursor` set to `next_cursor`.
|
|
additionalProperties: false
|
|
required:
|
|
- has_more
|
|
- next_cursor
|
|
properties:
|
|
has_more:
|
|
type: boolean
|
|
description: Whether another page follows this one.
|
|
next_cursor:
|
|
type:
|
|
- string
|
|
- 'null'
|
|
minLength: 1
|
|
maxLength: 512
|
|
pattern: ^[A-Za-z0-9_-]+$
|
|
description: Opaque cursor of the next page, or null on the last page. Clients must not parse, build, or store it beyond the current listing.
|
|
HealthResponse:
|
|
type: object
|
|
additionalProperties: false
|
|
required:
|
|
- status
|
|
properties:
|
|
status:
|
|
type: string
|
|
enum:
|
|
- ok
|
|
Problem:
|
|
type: object
|
|
description: Problem details (RFC 9457) returned with the application/problem+json media type for every error response. `code` is the stable, machine-readable reason; clients branch on it rather than on `title`, `detail`, or the HTTP status alone. The body never contains internal error text, stack traces, SQL, file paths, credentials, contact data, or echoed request values.
|
|
additionalProperties: false
|
|
required:
|
|
- type
|
|
- title
|
|
- status
|
|
- code
|
|
properties:
|
|
type:
|
|
type: string
|
|
format: uri-reference
|
|
maxLength: 256
|
|
description: URI that identifies the problem type. It has the form `urn:lincodex:problem:<code>` and is an identifier, not a link to dereference.
|
|
title:
|
|
type: string
|
|
minLength: 1
|
|
maxLength: 200
|
|
description: Short, fixed English summary of the problem type. It does not change between occurrences.
|
|
status:
|
|
type: integer
|
|
format: int32
|
|
minimum: 400
|
|
maximum: 599
|
|
description: HTTP status code generated by the origin server.
|
|
code:
|
|
$ref: '#/ProblemCode'
|
|
detail:
|
|
type: string
|
|
maxLength: 1000
|
|
description: Safe English explanation of this occurrence. It never contains internal error text or request values.
|
|
instance:
|
|
type: string
|
|
format: uri-reference
|
|
maxLength: 2048
|
|
description: URI reference that identifies this occurrence, when one exists.
|
|
trace_id:
|
|
type: string
|
|
minLength: 1
|
|
maxLength: 128
|
|
pattern: ^[A-Za-z0-9._-]+$
|
|
description: Request identifier, equal to the X-Request-ID response header. Quote it when reporting the problem; it is not a secret.
|
|
errors:
|
|
type: array
|
|
maxItems: 100
|
|
description: Field-level reasons for validation_failed. Other codes omit it.
|
|
items:
|
|
$ref: '#/ProblemFieldError'
|
|
ProblemCode:
|
|
type: string
|
|
description: 'Stable public error code. Adding a code is a contract change; renaming or removing one is a breaking change. Clients must handle an unknown code by its HTTP status.
|
|
|
|
|
|
- validation_failed (400): parameters or body do not match the contract, or a body violates a domain rule such as salary_from <= salary_to; `errors` points at the fields.
|
|
|
|
- unauthenticated (401): no valid session or credentials.
|
|
|
|
- forbidden (403): the caller is authenticated but not allowed.
|
|
|
|
- not_found (404): the route or object does not exist or is not visible.
|
|
|
|
- method_not_allowed (405): the route does not support the method.
|
|
|
|
- idempotency_in_progress (409): a request with the same Idempotency-Key is still being processed.
|
|
|
|
- state_conflict (409): the operation conflicts with the current state of the resource, for example an invitation that was already accepted.
|
|
|
|
- version_conflict (412): If-Match does not match the current version.
|
|
|
|
- payload_too_large (413): the request body exceeds the limit.
|
|
|
|
- unsupported_media_type (415): the request Content-Type is not accepted.
|
|
|
|
- idempotency_key_reused (422): the Idempotency-Key was already used with a different request.
|
|
|
|
- precondition_required (428): the operation requires If-Match.
|
|
|
|
- rate_limited (429): too many requests; see Retry-After.
|
|
|
|
- internal (500): unexpected server error.
|
|
|
|
- not_implemented (501): the operation is in the contract but not implemented yet.'
|
|
enum:
|
|
- validation_failed
|
|
- unauthenticated
|
|
- forbidden
|
|
- not_found
|
|
- method_not_allowed
|
|
- idempotency_in_progress
|
|
- state_conflict
|
|
- version_conflict
|
|
- payload_too_large
|
|
- unsupported_media_type
|
|
- idempotency_key_reused
|
|
- precondition_required
|
|
- rate_limited
|
|
- internal
|
|
- not_implemented
|
|
ProblemFieldError:
|
|
type: object
|
|
description: One reason why a request field or parameter is invalid.
|
|
additionalProperties: false
|
|
required:
|
|
- in
|
|
- pointer
|
|
- code
|
|
- message
|
|
properties:
|
|
in:
|
|
$ref: '#/ProblemFieldLocation'
|
|
pointer:
|
|
type: string
|
|
maxLength: 1024
|
|
pattern: ^(/([^~/]|~[01])*)*$
|
|
description: JSON Pointer (RFC 6901). For `body` it points into the request body document, for example `/salary_from`; an empty string means the whole body. For a parameter it is `/` followed by the parameter name, for example `/limit` or `/Idempotency-Key`.
|
|
code:
|
|
type: string
|
|
minLength: 1
|
|
maxLength: 64
|
|
pattern: ^[a-z][a-z0-9_]*$
|
|
description: Stable field reason. Current values are `required` (missing value) and `invalid` (malformed value or a value outside the schema). Clients must tolerate new values.
|
|
message:
|
|
type: string
|
|
minLength: 1
|
|
maxLength: 500
|
|
description: Fixed English message that never echoes the submitted value.
|
|
ProblemFieldLocation:
|
|
type: string
|
|
description: Part of the request that contains the invalid field.
|
|
enum:
|
|
- body
|
|
- query
|
|
- path
|
|
- header
|
|
- cookie
|