Skip to content

Instantly share code, notes, and snippets.

@taylor-jones
Created August 14, 2020 19:17
Show Gist options
  • Save taylor-jones/b889f35719e64ef2d761f57151665cf9 to your computer and use it in GitHub Desktop.
Save taylor-jones/b889f35719e64ef2d761f57151665cf9 to your computer and use it in GitHub Desktop.
YAML Glossary Item Schema
additionalProperties: true
default: {}
description: This is the schema for an individual glossary item
examples:
- acronym: FOO
description: foo
links:
- link: https://foo.com
title: foo
see:
link: https://foo.com
title: foo
tags:
- foo
- bar
term: foo
properties:
acronym:
default: ''
description: An explanation about the purpose of this instance.
examples:
- FOO
title: The acronym schema
type: string
description:
$id: '#/properties/description'
default: ''
description: An explanation about the purpose of this instance.
examples:
- foo
title: The description schema
type: string
links:
$id: '#/properties/links'
additionalItems: true
default: []
description: An explanation about the purpose of this instance.
examples:
- - link: https://foo.com
title: foo
items:
$id: '#/properties/links/items'
anyOf:
- $id: '#/properties/links/items/anyOf/0'
additionalProperties: true
default: {}
description: An explanation about the purpose of this instance.
examples:
- link: https://foo.com
title: foo
properties:
link:
$id: '#/properties/links/items/anyOf/0/properties/link'
default: ''
description: An explanation about the purpose of this instance.
examples:
- https://foo.com
title: The link schema
type: string
title:
$id: '#/properties/links/items/anyOf/0/properties/title'
default: ''
description: An explanation about the purpose of this instance.
examples:
- foo
title: The title schema
type: string
required:
- title
- link
title: The first anyOf schema
type: object
title: The links schema
type: array
see:
$id: '#/properties/see'
additionalProperties: true
default: {}
description: An explanation about the purpose of this instance.
examples:
- link: https://foo.com
title: foo
properties:
link:
$id: '#/properties/see/properties/link'
default: ''
description: An explanation about the purpose of this instance.
examples:
- https://foo.com
title: The link schema
type: string
title:
$id: '#/properties/see/properties/title'
default: ''
description: An explanation about the purpose of this instance.
examples:
- foo
title: The title schema
type: string
required:
- title
- link
title: The see schema
type: object
tags:
$id: '#/properties/tags'
additionalItems: true
default: []
description: An explanation about the purpose of this instance.
examples:
- - foo
- bar
items:
$id: '#/properties/tags/items'
anyOf:
- $id: '#/properties/tags/items/anyOf/0'
default: ''
description: An explanation about the purpose of this instance.
examples:
- foo
- bar
title: The first anyOf schema
type: string
title: The tags schema
type: array
term:
default: ''
description: An explanation about the purpose of this instance.
examples:
- foo
required:
- true
title: The term schema
type: string
uniqueItems: true
required:
- term
- description
title: Glossary item schema
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment