Skip to content

Latest commit

 

History

History
444 lines (236 loc) · 7.24 KB

simpletypes.schema.md

File metadata and controls

444 lines (236 loc) · 7.24 KB
template foo
reference
bar

Simple Types Schema

https://example.com/schemas/simpletypes

This is an example schema with examples for multiple types and their constraints.

Abstract Extensible Status Identifiable Custom Properties Additional Properties Defined In
Can be instantiated No Experimental No Forbidden Permitted simpletypes.schema.json

Simple Types Properties

Property Type Required Defined by
integer_threes integer Optional Simple Types (this schema)
interger_constrained integer Optional Simple Types (this schema)
interger_unconstrained integer Optional Simple Types (this schema)
number_constrained number Optional Simple Types (this schema)
number_unconstrained number Optional Simple Types (this schema)
string_date string Optional Simple Types (this schema)
string_email string Optional Simple Types (this schema)
string_hostname string Optional Simple Types (this schema)
string_ipv4 string Optional Simple Types (this schema)
string_ipv6 string Optional Simple Types (this schema)
string_length string Optional Simple Types (this schema)
string_pattern string Optional Simple Types (this schema)
string_pattern_noexample string Optional Simple Types (this schema)
string_pattern_singleexample string Optional Simple Types (this schema)
string_unconstrained string Optional Simple Types (this schema)
string_uri string Optional Simple Types (this schema)
yesno boolean Required Simple Types (this schema)
* any Additional this schema allows additional properties

integer_threes

Guess what number is valid

integer_threes

  • is optional
  • type: integer
  • defined in this schema

integer_threes Type

integer

  • minimum value: 2
  • maximum value: 4
  • must be a multiple of 3

interger_constrained

Just a whole number. I don't like fractions. Don't get too small

interger_constrained

  • is optional
  • type: integer
  • defined in this schema

interger_constrained Type

integer

  • minimum value: 10

interger_unconstrained

Just a whole number. I don't like fractions.

interger_unconstrained

  • is optional
  • type: integer
  • defined in this schema

interger_unconstrained Type

integer

number_constrained

Just a number. Don't get too big.

number_constrained

  • is optional
  • type: number
  • defined in this schema

number_constrained Type

number

  • value must not be greater or equal than: 10

number_unconstrained

Just a number

number_unconstrained

  • is optional
  • type: number
  • defined in this schema

number_unconstrained Type

number

string_date

A date-like string.

string_date

  • is optional
  • type: string
  • defined in this schema

string_date Type

string

string_email

An email-like string.

string_email

  • is optional
  • type: string
  • defined in this schema

string_email Type

string

string_hostname

A hostname-like string.

string_hostname

  • is optional
  • type: string
  • defined in this schema

string_hostname Type

string

string_ipv4

An IPv4-like string.

string_ipv4

  • is optional
  • type: string
  • defined in this schema

string_ipv4 Type

string

string_ipv6

An IPv6-like string.

string_ipv6

  • is optional
  • type: string
  • defined in this schema

string_ipv6 Type

string

string_length

A string with minumum and maximum length

string_length

  • is optional
  • type: string
  • defined in this schema

string_length Type

string

  • minimum length: 3 characters
  • maximum length: 3 characters

string_length Examples

"bar"
"baz"

string_pattern

A string following a regular expression

string_pattern

  • is optional
  • type: string
  • defined in this schema

string_pattern Type

string

All instances must conform to this regular expression

^ba.$
  • test example: bar
  • test example: baz
  • test example: bat

string_pattern Known Values

Value Description
baa the sounds of sheeps
bad German bathroom
bag holding device
bah humbug!
bam a loud sound
ban don't do this
bap a British soft bread roll
bas from ancient Egyptian religion, an aspect of the soul
bat …out of hell
bay , sitting by the dock of the

string_pattern Examples

"bar"
"baz"
"bat"

string_pattern_noexample

A string following a regular expression

string_pattern_noexample

  • is optional
  • type: string
  • defined in this schema

string_pattern_noexample Type

string

All instances must conform to this regular expression (test examples here):

^ba.$

string_pattern_singleexample

A string following a regular expression

string_pattern_singleexample

  • is optional
  • type: string
  • defined in this schema

string_pattern_singleexample Type

string

All instances must conform to this regular expression

^ba.$
  • test example: bar

string_pattern_singleexample Example

"bar"

string_unconstrained

A simple string, without any constraints.

string_unconstrained

  • is optional
  • type: string
  • defined in this schema

string_unconstrained Type

string

string_unconstrained Example

"bar"

string_uri

A URI.

string_uri

  • is optional
  • type: string
  • defined in this schema

string_uri Type

string

  • format: uri – Uniformous Resource Identifier (according to RFC3986)

yesno

yesno

  • is required
  • type: boolean
  • defined in this schema

yesno Type

boolean