Last updated 4 months ago

JsonSchema

id
integer <int64>

Pet ID

object

Categories this pet belongs to

name
required
string

The name given to a pet

photoUrls
required
Array of strings <url> <= 20 items

The list of URL to a cute photos featuring pet

friend
object Recursive
Array of objects (Tag) non-empty

Tags attached to the pet

status
string
Enum: "available" "pending" "sold"

Pet status in the store

petType
string

Type of a pet

huntingSkill
required
string
Default: "lazy"
Enum: "clueless" "lazy" "adventurous" "aggressive"

The measured skill for hunting

name
string

The name given to a pet

status
string
Enum: "available" "pending" "sold"

Pet status in the store

petType
string

Type of a pet

huntingSkill
required
string
Default: "lazy"
Enum: "clueless" "lazy" "adventurous" "aggressive"

The measured skill for hunting

<JsonSchema definitionId="petstore" pointer="#/components/schemas/Pet" />
<JsonSchema
  schema={{
    type: 'object',
    description: 'A representation of a cat',
    properties: {
      huntingSkill: {
        type: 'string',
        description: 'The measured skill for hunting',
        default: 'lazy',
        example: 'adventurous',
        enum: ['clueless', 'lazy', 'adventurous', 'aggressive'],
      },
    },
    required: ['huntingSkill'],
  }}
/>

Props

Provide one of the following definitionId and pointer or schema.

NameTypeDefaultDescription
definitionIdstringDefinition ID as defined in siteConfig.yaml
pointerstringJSON Pointer to the Response Object inside the definition
schemaobjectJSON Schema