Skip to content

7. Schemas

The @schema Collection (Schema SCHEMA_COLLECTION) uses the endpoints of section 2, with @schema as the Collection and the Slug of the described Collection as the Resource ID.

Operation Method and path
list GET /@schema
get GET /@schema/:collection
create POST /@schema
clone POST /@schema/:collection/clone
patchById PATCH /@schema/:collection
patchByQuery PATCH /@schema
replaceById PUT /@schema/:collection
replaceByQuery PUT /@schema
deleteById DELETE /@schema/:collection
deleteByQuery DELETE /@schema

HTTP_SCHEMA_ENDPOINTS MUST

Servers MUST expose the operations on schemas they support with the method and path in the table above.

HTTP_SCHEMA_ALIAS MUST

GET, PUT, PATCH and DELETE on /:collection/@schema MUST be equivalent to the same method on /@schema/:collection.

HTTP_SCHEMA_DERIVE MUST

The “Derive” Parameter (Schema SCHEMA_DERIVE) MUST be sent as the control parameter @derive=true.

HTTP_SCHEMA_DESCRIBEDBY SHOULD

Responses of get and list on a Collection with a registered schema SHOULD include a Link header field with the describedby relation to /@schema/:collection.

HTTP_SCHEMA_RAW MUST

GET /@schema/:collection with Accept: application/schema+json MUST respond with only the value of the schema Field, compiled as specified by ESType (ESType section 2), labeled application/schema+json. When the Collection has no registered schema (Schema SCHEMA_NULL), the Server MUST fail with the NOT_FOUND error, with target schema (Schema SCHEMA_NOT_FOUND_TARGET).

HTTP_SCHEMA_STATUS MUST

An INVALID_INPUT error caused by a Resource that does not conform to a strict schema (Schema SCHEMA_STRICT) MUST be mapped to 422 Unprocessable Content; other INVALID_INPUT errors keep 400 Bad Request.

HTTP_SCHEMA_PROBLEM_ERRORS SHOULD

The Problem Details object of a SCHEMA_STRICT error SHOULD carry the violations (Schema SCHEMA_VIOLATION_DETAILS) in an errors member, as an array of output units.

HTTP_SCHEMA_WARNING_PARAMS SHOULD

Each SCHEMA_VIOLATION Warning SHOULD be a separate item of the Warning header field, with the parameters instance (the instanceLocation) and keyword (the keywordLocation).

Source: lingodata/crud@bc225ba · specs/http/sections/07-schema.md · http 0.2.0 (draft)

LingoData specifications, reference implementations and this site are licensed under the Apache License 2.0. Copyright 2026 Gustavo Gondim.