Skip to content

Instantly share code, notes, and snippets.

@tarquin-the-brave
Created May 12, 2020 11:56
Show Gist options
  • Save tarquin-the-brave/cd8e253784c84e1451d6fe5900dc5aab to your computer and use it in GitHub Desktop.
Save tarquin-the-brave/cd8e253784c84e1451d6fe5900dc5aab to your computer and use it in GitHub Desktop.
$schema: http://json-schema.org/draft-07/schema
$id: http://example.com/root.json
type: object
title: The Root Schema
description: The root schema is the schema that comprises the entire JSON document.
default: {}
required:
- checked
- dimensions
- id
- name
- price
- tags
properties:
checked:
$id: '#/properties/checked'
type: boolean
title: The Checked Schema
description: An explanation about the purpose of this instance.
default: false
examples:
- false
dimensions:
$id: '#/properties/dimensions'
type: object
title: The Dimensions Schema
description: An explanation about the purpose of this instance.
default: {}
examples:
- height: 10
width: 5
required:
- width
- height
properties:
width:
$id: '#/properties/dimensions/properties/width'
type: integer
title: The Width Schema
description: An explanation about the purpose of this instance.
default: 0
examples:
- 5
height:
$id: '#/properties/dimensions/properties/height'
type: integer
title: The Height Schema
description: An explanation about the purpose of this instance.
default: 0
examples:
- 10
id:
$id: '#/properties/id'
type: integer
title: The Id Schema
description: An explanation about the purpose of this instance.
default: 0
examples:
- 1
name:
$id: '#/properties/name'
type: string
title: The Name Schema
description: An explanation about the purpose of this instance.
default: ''
examples:
- A green door
price:
$id: '#/properties/price'
type: number
title: The Price Schema
description: An explanation about the purpose of this instance.
default: 0
examples:
- 12.5
tags:
$id: '#/properties/tags'
type: array
title: The Tags Schema
description: An explanation about the purpose of this instance.
default: []
examples:
- - home
- green
items:
$id: '#/properties/tags/items'
type: string
title: The Items Schema
description: An explanation about the purpose of this instance.
default: ''
examples:
- home
- green
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment