Back to showcase

Schema Components

Components for displaying object definitions, properties, types, and enum values. Driven by frontmatter properties and exampleResponse.

ObjectDefinition

"The Object" pattern. Displays object name, description, and all properties using PropertyRow. Used on resource /object pages.

The Customer object

Customer objects allow you to perform recurring charges, and to track multiple charges that are associated with the same customer.

id string REQUIRED

Unique identifier for the object.

email string (email) NULLABLE REQUIRED

The customer's email address.

format: email
status string REQUIRED

The current status of the customer account.

Possible enum values:

  • active Account is active and in good standing
  • inactive Account is temporarily disabled
  • archived Account has been permanently archived
metadata object NULLABLE

Set of key-value pairs for additional information.

PropTypeDescription
namestringObject name (rendered as "The [name] object")
descriptionstringObject description
propertiesParameter[]Array of property definitions
examplestring?JSON example (typically shown in code panel instead)
Frontmatter example
type: object
resource: Customer
description: Customer objects allow you to perform recurring charges...
properties:
  - name: id
    type: string
    required: true
    description: Unique identifier for the object.
  - name: email
    type: string
    required: true
    nullable: true
    format: email
    description: The customer's email address.

PropertyRow

Individual property display with name, type badge, required/nullable/deprecated badges, and support for nested children. Used internally by ObjectDefinition and ParameterList.

email string NULLABLE REQUIRED

The customer's email address.

legacy_id string DEPRECATED

Use id instead.

TypeBadge

Displays a type label with optional format and array item type.

string integer boolean string (date-time) array of string array of object (date-time)
PropTypeDescription
typestringBase type name
itemTypestring?For arrays: item type (renders as "array of itemType")
formatstring?Format qualifier (renders in parentheses)

EnumValues

Displays "Possible enum values:" with bullet-pointed values and descriptions.

Possible enum values:

  • active Account is active and in good standing
  • inactive Account is temporarily disabled
  • archived Account has been permanently archived
PropTypeDescription
valuesEnumValue[]Array of { value, description? } objects
Frontmatter usage
properties:
  - name: status
    type: string
    enum:
      - value: active
        description: Account is active and in good standing
      - value: inactive
        description: Account is temporarily disabled
      - value: archived
        description: Account has been permanently archived