Examples

Schema files for these examples

You can see the schema files used for these examples:

Basic Example

.. jsonschema:: example_schema.json

Title

Description

Type

Format

Required

id

string

Identifier

name

string

Name

A casual name for this person. A link.

formalname

string

Formal Name

A formal name for this person

age

object

The person’s age

age/actual

number

Actual Age

age/admitted

number

Admitted Age

address

object

Address

Where this person lives

See Address

With include option

.. jsonschema:: example_schema.json
   :include: id,name,age/actual

Title

Description

Type

Format

Required

id

string

Identifier

name

string

Name

A casual name for this person. A link.

age/actual

number

Actual Age

With collapse option

.. jsonschema:: example_schema.json
   :collapse: age

Title

Description

Type

Format

Required

id

string

Identifier

name

string

Name

A casual name for this person. A link.

formalname

string

Formal Name

A formal name for this person

age

object

The person’s age

address

object

Address

Where this person lives

See Address

With pointer option

.. jsonschema:: example_schema.json
   :pointer: /definitions/Address

Title

Description

Type

Format

Required

address

string

Address Details

postcode

string

Postcode

country

string

Country

With nocrossref flag

.. jsonschema:: example_schema.json
   :nocrossref:

Title

Description

Type

Format

Required

id

string

Identifier

name

string

Name

A casual name for this person. A link.

formalname

string

Formal Name

A formal name for this person

age

object

The person’s age

age/actual

number

Actual Age

age/admitted

number

Admitted Age

address

object

Address

Where this person lives

With allowexternalrefs option

.. jsonschema:: example_schema_with_external_refs.json
   :allowexternalrefs:

Title

Description

Type

Format

Required

id

string

Identifier

name

string

Name

The name for this person

address

object

Address

Where this person lives

See Address

address/address

string

Address Details

address/postcode

string

Postcode

address/country

string

Country