-
-
Notifications
You must be signed in to change notification settings - Fork 6
Document the new RDF endpoint and MCP tool #1119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -269,6 +269,82 @@ insight into the validation engine's behavior and logic flow. | |
|
|
||
| The `Expect` header carries an expectation other than `100-continue`. See [RFC 9110 §10.1.1](https://datatracker.ietf.org/doc/html/rfc9110#section-10.1.1). | ||
|
|
||
| ### RDF | ||
|
|
||
| !!! success "Enterprise" | ||
|
|
||
| This endpoint is only available in the [Enterprise](commercial.md) | ||
| edition. Learn more about [commercial licensing](commercial.md). | ||
|
|
||
| *This endpoint takes a JSON instance as a request body, validates it against | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. docs/api.md:279 — This endpoint’s request body isn’t a raw JSON instance; it expects an envelope object with an Severity: medium 🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage. |
||
| the JSON Schema located at the `{path}` parameter, and promotes it to | ||
| [JSON-LD](https://www.w3.org/TR/json-ld11/) (and therefore RDF) using the | ||
| schema's `x-jsonld-*` annotations.* | ||
|
|
||
| ``` | ||
| POST /self/v1/api/schemas/rdf/{path} | ||
| ``` | ||
|
|
||
| The same schema that validates the instance declares how it maps to Linked | ||
| Data, keeping a single source of truth for both concerns. The annotation | ||
| vocabulary is documented in the [JSON Schema CLI RDF | ||
| documentation](https://github.com/sourcemeta/jsonschema/blob/main/docs/rdf.markdown). | ||
| A schema without such annotations (including schemas on dialects older than | ||
| 2019-09, which do not support annotation collection) produces an empty | ||
| JSON-LD document. Availability follows the evaluate flag: schemas excluded | ||
| from evaluation in the [configuration file](configuration.md) cannot be | ||
| promoted. | ||
|
|
||
| | Property | Type | Required | Description | | ||
| |----------|------|----------|-------------| | ||
| | `/instance` | JSON | Yes | The instance to validate and promote | | ||
| | `/flatten` | Boolean | No | Whether to flatten the resulting document. Defaults to `false` | | ||
| | `/context` | Object | No | A JSON-LD context to compact (or, with `flatten`, flatten) the resulting document against | | ||
|
|
||
| Without a `context`, the response is the document in [expanded | ||
| form](https://www.w3.org/TR/json-ld11/#expanded-document-form) (or [flattened | ||
| form](https://www.w3.org/TR/json-ld11/#flattened-document-form) with | ||
| `flatten`). With a `context`, the response is in [compacted | ||
| form](https://www.w3.org/TR/json-ld11/#compacted-document-form). Remote | ||
| contexts are not fetched. | ||
|
|
||
| === "200" | ||
|
jviotti marked this conversation as resolved.
|
||
|
|
||
| The instance promoted to JSON-LD, served as `application/ld+json`. | ||
|
|
||
| === "400" | ||
|
|
||
| You must pass a request body that matches the request schema, or the | ||
| provided `context` cannot be processed (for example because it references | ||
| a remote context). | ||
|
|
||
| === "404" | ||
|
|
||
| The schema does not exist. | ||
|
|
||
| === "405" | ||
|
|
||
| The [configuration file](configuration.md) excludes evaluation for this | ||
| schema, or the [configuration file](configuration.md) marks the schema | ||
| collection as listed but not served. | ||
|
|
||
| === "413" | ||
|
|
||
| The request body is too large. See [RFC 9110 §15.5.14](https://datatracker.ietf.org/doc/html/rfc9110#section-15.5.14). | ||
|
|
||
| === "417" | ||
|
|
||
| The `Expect` header carries an expectation other than `100-continue`. See [RFC 9110 §10.1.1](https://datatracker.ietf.org/doc/html/rfc9110#section-10.1.1). | ||
|
|
||
| === "422" | ||
|
|
||
| The instance does not conform to the schema (the problem details carry | ||
| the standard [JSON Schema output | ||
| errors](https://json-schema.org/draft/2020-12/json-schema-core#name-output-structure)), | ||
| or the schema's JSON-LD annotations cannot be resolved for this instance | ||
| (the problem details carry the offending annotation facet and instance | ||
| location). | ||
|
|
||
| ### Metadata | ||
|
|
||
| *This endpoint retrieves metadata information about the JSON Schema located at | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.