template | foo |
---|---|
reference |
bar |
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 |
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 |
Guess what number is valid
integer_threes
- is optional
- type:
integer
- defined in this schema
integer
- minimum value:
2
- maximum value:
4
- must be a multiple of
3
Just a whole number. I don't like fractions. Don't get too small
interger_constrained
- is optional
- type:
integer
- defined in this schema
integer
- minimum value:
10
Just a whole number. I don't like fractions.
interger_unconstrained
- is optional
- type:
integer
- defined in this schema
integer
Just a number. Don't get too big.
number_constrained
- is optional
- type:
number
- defined in this schema
number
- value must not be greater or equal than:
10
Just a number
number_unconstrained
- is optional
- type:
number
- defined in this schema
number
A date-like string.
string_date
- is optional
- type:
string
- defined in this schema
string
- format:
date-time
– date and time (according to RFC 3339, section 5.6)
An email-like string.
string_email
- is optional
- type:
string
- defined in this schema
string
- format:
email
– email address (according to RFC 5322, section 3.4.1)
A hostname-like string.
string_hostname
- is optional
- type:
string
- defined in this schema
string
- format:
hostname
– Domain Name (according to RFC 1034, section 3.1)
An IPv4-like string.
string_ipv4
- is optional
- type:
string
- defined in this schema
string
- format:
ipv4
– IP (v4) address (according to RFC 2673, section 3.2)
An IPv6-like string.
string_ipv6
- is optional
- type:
string
- defined in this schema
string
- format:
ipv6
– IP (v6) address (according to RFC 4291, section 2.2)
A string with minumum and maximum length
string_length
- is optional
- type:
string
- defined in this schema
string
- minimum length: 3 characters
- maximum length: 3 characters
"bar"
"baz"
A string following a regular expression
string_pattern
- is optional
- type:
string
- defined in this schema
string
All instances must conform to this regular expression
^ba.$
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 |
"bar"
"baz"
"bat"
A string following a regular expression
string_pattern_noexample
- is optional
- type:
string
- defined in this schema
string
All instances must conform to this regular expression (test examples here):
^ba.$
A string following a regular expression
string_pattern_singleexample
- is optional
- type:
string
- defined in this schema
string
All instances must conform to this regular expression
^ba.$
- test example: bar
"bar"
A simple string, without any constraints.
string_unconstrained
- is optional
- type:
string
- defined in this schema
string
"bar"
A URI.
string_uri
- is optional
- type:
string
- defined in this schema
string
- format:
uri
– Uniformous Resource Identifier (according to RFC3986)
yesno
- is required
- type:
boolean
- defined in this schema
boolean