DoryDocs

Expandable

The Expandable component and its companion components (ResponseField, Properties, Property) are designed for documenting API response schemas and nested data structures.

Expandable#

A collapsible section with a title and optional icon:

<Expandable>

Expandable with Icon#

<Expandable>

ResponseField#

Document a single API response field with its type and description:

<ResponseField>

idstringrequired

Unique identifier for the resource. Format: UUID v4.

namestringrequired

Display name of the resource. Max 255 characters.

metadataobject

Optional key-value metadata attached to the resource.

created_atstring (ISO 8601)

Timestamp when the resource was created.

Properties and Property#

Document a group of schema properties:

<Properties> <Property>

user_idstring

ID of the authenticated user making the request.

workspacestring

Workspace slug. Defaults to the user's personal workspace.

dry_runboolean

If true, validates the request without making changes.

Nested Schema Example#

Combine Expandable with ResponseField and Properties for complex nested schemas:

<ResponseField> <Expandable>

userobjectrequired

The authenticated user object.

Props Reference#

Expandable Props

PropTypeDescription
titlestringLabel shown when the section is collapsed.
iconstringOptional Clidey Design icon name.
childrenReactNodeContent shown when expanded.

ResponseField Props

PropTypeDescription
namestringField name (e.g. "user_id").
typestringData type (e.g. "string", "object", "boolean").
requiredbooleanIf true, shows a "Required" badge.
childrenReactNodeDescription of the field.

Property Props

PropTypeDescription
namestringProperty name.
typestringData type.
childrenReactNodeDescription of the property.

Was this page helpful?