Returns the schema used to validate and describe document data in ProseMirror JSON format. Pass latest to get the current latest document schema, or pass a concrete version in v{number} format. The latest alias is resolved to the actual version in the response. Use format=draft-06 to get JSON Schema draft-06 representation, or format=prosemirror to get sanitized ProseMirror node and mark specs.
| Name | Type | Reference |
|---|---|---|
| idrequired | string | Document schema version. Use latest for the latest available schema, or a version in v{number} format, for example v25. When latest is used, the response version field contains the resolved v{number} version. |
| Name | Type | Constraints | Description |
|---|---|---|---|
| format | enum | Response format. Default: draft-06. |
| Description | Response type | Example |
|---|---|---|
| Success | Object |
| Name | Type | Description |
|---|---|---|
| $schema | string | JSON Schema dialect URI. Always http://json-schema.org/draft-06/schema for this format. |
| $id | string | Schema identifier in kaiten://document-schemas/{version} format. |
| title | string | Schema title. |
| description | string | Schema description. |
| allOf | array | Root schema references. Points to the top ProseMirror node definition. |
| version | string | Resolved document schema version. If latest was requested, this field contains the actual v{number} version. |
| definitions | object | JSON Schema definitions for document nodes and marks. |
| Description | Response type | Example |
|---|---|---|
| Success | Object |
| Name | Type | Description |
|---|---|---|
| type | string | Schema response type. Always prosemirror-document-data-schema. |
| version | string | Resolved document schema version. If latest was requested, this field contains the actual v{number} version. |
| topNode | string | Name of the top ProseMirror node. |
| data | object | Top-level document data descriptor. |
| nodes | object | Map of sanitized ProseMirror node specs. Runtime-only fields such as parseDOM and toDOM are omitted. |
| marks | object | Map of sanitized ProseMirror mark specs. Runtime-only fields such as parseDOM and toDOM are omitted. |
| Description | Response type | Example |
|---|---|---|
| Unsupported schema format | Object |
| Name | Type | Description |
|---|---|---|
| message | string | Error message |
| allowedFormats | array | Allowed format values. |
| Description | Response type | Example |
|---|---|---|
| Schema version not found | Object |
| Name | Type | Description |
|---|---|---|
| message | string | Error message |
Path Parameters
1 curl --request GET \
2 --url 'https://example.kaiten.ru/api/latest/document-schemas/{id}' \
3 --header 'Accept: application/json' \
4 --header 'Content-Type: application/json'
5 Response
ClickTry It!to start a request and see the response here!