Embed an ERD, OpenAPI, or MDX artifact attached to a model object.
The Artifact component embeds a generated artifact — an ERD, an OpenAPI contract, or a nested MDX document — that is attached to a model object. This keeps contracts next to the prose that explains them.
Basic usage
<Artifact
model_key="logic"
object_id="logic.iomodel.api"
artifact_key="openapi"
type="openapi"
/>| Prop | Required | Purpose |
|---|---|---|
model_key | No | Model context (defaults to route) |
object_id | Yes (in specs) | Object that owns the artifact |
artifact_key | Yes | Artifact tab key to load |
type | Yes | erd, openapi, or mdx |
Supported props
Artifact does not use path or title. Use object_id + artifact_key +
type.
Artifact types
Renders an interactive API viewer from the OpenAPI artifact.
<Artifact object_id="logic.iomodel.api" artifact_key="openapi" type="openapi" />Document the contract once as an artifact and embed it wherever it is relevant. Updating the artifact updates every spec that embeds it. See Artifact component reference.
Last updated on