Embed Artifacts
Embed Artifacts

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"
/>
PropRequiredPurpose
model_keyNoModel context (defaults to route)
object_idYes (in specs)Object that owns the artifact
artifact_keyYesArtifact tab key to load
typeYeserd, 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