Skip to content
Snippets Groups Projects
Commit 17197943 authored by Aaron Clark's avatar Aaron Clark
Browse files

Update spec and generated examples

parent 5c5e832f
Branches
Tags
No related merge requests found
Showing
with 171 additions and 10 deletions
...@@ -28,6 +28,7 @@ This is an abstract schema. It has `definitions`, but does not declare any prope ...@@ -28,6 +28,7 @@ This is an abstract schema. It has `definitions`, but does not declare any prope
A unique identifier given to every addressable thing. A unique identifier given to every addressable thing.
`bar` `bar`
* is optional * is optional
* type: `string` * type: `string`
* defined in this schema * defined in this schema
...@@ -42,11 +43,13 @@ A unique identifier given to every addressable thing. ...@@ -42,11 +43,13 @@ A unique identifier given to every addressable thing.
## foo ## foo
A unique identifier given to every addressable thing. A unique identifier given to every addressable thing.
`foo` `foo`
* is optional * is optional
* type: `string` * type: `string`
* defined in this schema * defined in this schema
...@@ -61,11 +64,13 @@ A unique identifier given to every addressable thing. ...@@ -61,11 +64,13 @@ A unique identifier given to every addressable thing.
## nonfoo ## nonfoo
This is not foo. This is not foo.
`nonfoo` `nonfoo`
* is optional * is optional
* type: `const` * type: `const`
* defined in this schema * defined in this schema
......
...@@ -34,6 +34,7 @@ This is an example schema with examples for multiple array types and their const ...@@ -34,6 +34,7 @@ This is an example schema with examples for multiple array types and their const
This is an array This is an array
`boollist` `boollist`
* is optional * is optional
* type: `boolean[]` * type: `boolean[]`
* at least `1` items in the array * at least `1` items in the array
...@@ -58,6 +59,7 @@ All items must be of the type: ...@@ -58,6 +59,7 @@ All items must be of the type:
This is an array of coordinates in three-dimensional space. This is an array of coordinates in three-dimensional space.
`coordinatelist` `coordinatelist`
* is optional * is optional
* type: `number[][]` (nested array) * type: `number[][]` (nested array)
* no more than `10` items in the array * no more than `10` items in the array
...@@ -72,6 +74,7 @@ Nested array type: `number[]` ...@@ -72,6 +74,7 @@ Nested array type: `number[]`
All items must be of the type: All items must be of the type:
`number` `number`
* minimum value: `0` * minimum value: `0`
* maximum value: `10` * maximum value: `10`
...@@ -92,6 +95,7 @@ A coordinate, specified by `x`, `y`, and `z` values ...@@ -92,6 +95,7 @@ A coordinate, specified by `x`, `y`, and `z` values
This is an array This is an array
`intlist` `intlist`
* is optional * is optional
* type: `integer[]` * type: `integer[]`
* between `1` and `10` items in the array * between `1` and `10` items in the array
...@@ -113,14 +117,15 @@ All items must be of the type: ...@@ -113,14 +117,15 @@ All items must be of the type:
## list ## list
This is an array This is an array
`list` `list`
* is optional * is optional
* type: `string[]` * type: `string[]`
* defined in this schema * defined in this schema
### list Type ### list Type
...@@ -139,14 +144,15 @@ All items must be of the type: ...@@ -139,14 +144,15 @@ All items must be of the type:
## listlist ## listlist
This is an array of arrays This is an array of arrays
`listlist` `listlist`
* is optional * is optional
* type: `array[]` (nested array) * type: `array[]` (nested array)
* defined in this schema * defined in this schema
### listlist Type ### listlist Type
...@@ -168,6 +174,7 @@ Nested array type: `array` ...@@ -168,6 +174,7 @@ Nested array type: `array`
This is an array This is an array
`numlist` `numlist`
* is optional * is optional
* type: `number[]` * type: `number[]`
* no more than `10` items in the array * no more than `10` items in the array
...@@ -180,6 +187,7 @@ Array type: `number[]` ...@@ -180,6 +187,7 @@ Array type: `number[]`
All items must be of the type: All items must be of the type:
`number` `number`
* minimum value: `10` * minimum value: `10`
...@@ -194,9 +202,9 @@ All items must be of the type: ...@@ -194,9 +202,9 @@ All items must be of the type:
An array of simple objects An array of simple objects
`objectlist` `objectlist`
* is optional * is optional
* type: `object[]` * type: `object[]`
* defined in this schema * defined in this schema
### objectlist Type ### objectlist Type
...@@ -220,6 +228,7 @@ All items must be of the type: ...@@ -220,6 +228,7 @@ All items must be of the type:
The a property The a property
`a` `a`
* is **required** * is **required**
* type: `string` * type: `string`
...@@ -235,11 +244,13 @@ The a property ...@@ -235,11 +244,13 @@ The a property
#### b #### b
The b property The b property
`b` `b`
* is optional * is optional
* type: `integer` * type: `integer`
...@@ -261,14 +272,15 @@ The b property ...@@ -261,14 +272,15 @@ The b property
## stringlistlist ## stringlistlist
This is an array of arrays of strings This is an array of arrays of strings
`stringlistlist` `stringlistlist`
* is optional * is optional
* type: `string[][]` (nested array) * type: `string[][]` (nested array)
* defined in this schema * defined in this schema
### stringlistlist Type ### stringlistlist Type
...@@ -290,3 +302,4 @@ All items must be of the type: ...@@ -290,3 +302,4 @@ All items must be of the type:
...@@ -40,6 +40,7 @@ This is an example schema that uses types defined in other schemas. ...@@ -40,6 +40,7 @@ This is an example schema that uses types defined in other schemas.
Number in a range Number in a range
`and` `and`
* is optional * is optional
* type: complex * type: complex
* defined in this schema * defined in this schema
...@@ -54,6 +55,7 @@ Number in a range ...@@ -54,6 +55,7 @@ Number in a range
`number` `number`
* maximum value: `10` * maximum value: `10`
...@@ -61,6 +63,7 @@ Number in a range ...@@ -61,6 +63,7 @@ Number in a range
`number` `number`
* minimum value: `0` * minimum value: `0`
...@@ -74,6 +77,7 @@ Number in a range ...@@ -74,6 +77,7 @@ Number in a range
String or number… String or number…
`or` `or`
* is optional * is optional
* type: complex * type: complex
* defined in this schema * defined in this schema
...@@ -91,10 +95,12 @@ String or number… ...@@ -91,10 +95,12 @@ String or number…
#### Option 2 #### Option 2
`number` `number`
* minimum value: `0` * minimum value: `0`
...@@ -107,6 +113,7 @@ String or number… ...@@ -107,6 +113,7 @@ String or number…
`refabstract` `refabstract`
* is **required** * is **required**
* type: `object` * type: `object`
* defined in this schema * defined in this schema
...@@ -129,6 +136,7 @@ String or number… ...@@ -129,6 +136,7 @@ String or number…
A unique identifier given to every addressable thing. A unique identifier given to every addressable thing.
`foo` `foo`
* is optional * is optional
* type: `string` * type: `string`
...@@ -144,11 +152,13 @@ A unique identifier given to every addressable thing. ...@@ -144,11 +152,13 @@ A unique identifier given to every addressable thing.
#### nonfoo #### nonfoo
This is not foo. This is not foo.
`nonfoo` `nonfoo`
* is optional * is optional
* type: `const` * type: `const`
...@@ -171,9 +181,9 @@ false ...@@ -171,9 +181,9 @@ false
`reflist` `reflist`
* is optional * is optional
* type: Simple * type: Simple
* defined in this schema * defined in this schema
### reflist Type ### reflist Type
...@@ -195,6 +205,7 @@ All items must be of the type: ...@@ -195,6 +205,7 @@ All items must be of the type:
`refnamed` `refnamed`
* is optional * is optional
* type: Simple * type: Simple
* defined in this schema * defined in this schema
...@@ -213,6 +224,7 @@ All items must be of the type: ...@@ -213,6 +224,7 @@ All items must be of the type:
Exclusive choice. Exclusive choice.
`xor` `xor`
* is optional * is optional
* type: complex * type: complex
* defined in this schema * defined in this schema
...@@ -227,6 +239,7 @@ Exclusive choice. ...@@ -227,6 +239,7 @@ Exclusive choice.
`number` `number`
* maximum value: `0` * maximum value: `0`
...@@ -234,6 +247,7 @@ Exclusive choice. ...@@ -234,6 +247,7 @@ Exclusive choice.
`number` `number`
* minimum value: `10` * minimum value: `10`
...@@ -247,6 +261,7 @@ Applies to all properties that match the regular expression `int.*` ...@@ -247,6 +261,7 @@ Applies to all properties that match the regular expression `int.*`
`int.*` `int.*`
* is a property pattern * is a property pattern
* type: `integer` * type: `integer`
* defined in this schema * defined in this schema
...@@ -261,11 +276,13 @@ Applies to all properties that match the regular expression `int.*` ...@@ -261,11 +276,13 @@ Applies to all properties that match the regular expression `int.*`
## Pattern: `str.*` ## Pattern: `str.*`
Applies to all properties that match the regular expression `str.*` Applies to all properties that match the regular expression `str.*`
`str.*` `str.*`
* is a property pattern * is a property pattern
* type: `string` * type: `string`
* defined in this schema * defined in this schema
...@@ -279,3 +296,4 @@ Applies to all properties that match the regular expression `str.*` ...@@ -279,3 +296,4 @@ Applies to all properties that match the regular expression `str.*`
...@@ -27,6 +27,7 @@ This is an example schema with examples for properties with constant values ...@@ -27,6 +27,7 @@ This is an example schema with examples for properties with constant values
A simple string, without strong constraints. A simple string, without strong constraints.
`hello` `hello`
* is **required** * is **required**
* type: `const` * type: `const`
* defined in this schema * defined in this schema
......
...@@ -28,6 +28,7 @@ This is an extensible schema. It has `definitions`, that can be used in other sc ...@@ -28,6 +28,7 @@ This is an extensible schema. It has `definitions`, that can be used in other sc
A unique identifier given to every addressable thing. A unique identifier given to every addressable thing.
`bar` `bar`
* is optional * is optional
* type: `string` * type: `string`
* defined in this schema * defined in this schema
...@@ -42,11 +43,13 @@ A unique identifier given to every addressable thing. ...@@ -42,11 +43,13 @@ A unique identifier given to every addressable thing.
## foo ## foo
A unique identifier given to every addressable thing. A unique identifier given to every addressable thing.
`foo` `foo`
* is optional * is optional
* type: `string` * type: `string`
* defined in this schema * defined in this schema
...@@ -60,3 +63,4 @@ A unique identifier given to every addressable thing. ...@@ -60,3 +63,4 @@ A unique identifier given to every addressable thing.
...@@ -39,6 +39,7 @@ This is an extending schema. It is extending another extending schema. It pulls ...@@ -39,6 +39,7 @@ This is an extending schema. It is extending another extending schema. It pulls
An `id` with an `@` in front of it. The `@` stands for "dot com" An `id` with an `@` in front of it. The `@` stands for "dot com"
`@id` `@id`
* is optional * is optional
* type: `string` * type: `string`
* defined in [Definitions](definitions.schema.md#id) * defined in [Definitions](definitions.schema.md#id)
...@@ -47,6 +48,7 @@ An `id` with an `@` in front of it. The `@` stands for "dot com" ...@@ -47,6 +48,7 @@ An `id` with an `@` in front of it. The `@` stands for "dot com"
`string` `string`
* format: `uri` – Uniformous Resource Identifier (according to [RFC3986](http://tools.ietf.org/html/rfc3986)) * format: `uri` – Uniformous Resource Identifier (according to [RFC3986](http://tools.ietf.org/html/rfc3986))
...@@ -59,6 +61,7 @@ An `id` with an `@` in front of it. The `@` stands for "dot com" ...@@ -59,6 +61,7 @@ An `id` with an `@` in front of it. The `@` stands for "dot com"
A horse walks into it. A horse walks into it.
`bar` `bar`
* is optional * is optional
* type: `string` * type: `string`
* defined in [Extensible](extensible.schema.md#bar) * defined in [Extensible](extensible.schema.md#bar)
...@@ -72,6 +75,7 @@ A horse walks into it. ...@@ -72,6 +75,7 @@ A horse walks into it.
### bar Examples ### bar Examples
```json ```json
...@@ -90,6 +94,7 @@ A horse walks into it. ...@@ -90,6 +94,7 @@ A horse walks into it.
This property has a unique name to demonstrate it's uniqueness. This property has a unique name to demonstrate it's uniqueness.
`baz` `baz`
* is optional * is optional
* type: `string` * type: `string`
* defined in [Extending](extending.schema.md#baz) * defined in [Extending](extending.schema.md#baz)
...@@ -103,6 +108,7 @@ This property has a unique name to demonstrate it's uniqueness. ...@@ -103,6 +108,7 @@ This property has a unique name to demonstrate it's uniqueness.
### baz Example ### baz Example
```json ```json
...@@ -115,6 +121,7 @@ This property has a unique name to demonstrate it's uniqueness. ...@@ -115,6 +121,7 @@ This property has a unique name to demonstrate it's uniqueness.
A unique identifier given to every addressable thing. A unique identifier given to every addressable thing.
`hey` `hey`
* is optional * is optional
* type: `string` * type: `string`
* defined in this schema * defined in this schema
...@@ -129,11 +136,13 @@ A unique identifier given to every addressable thing. ...@@ -129,11 +136,13 @@ A unique identifier given to every addressable thing.
## id ## id
A unique identifier given to every addressable thing. A unique identifier given to every addressable thing.
`id` `id`
* is optional * is optional
* type: `string` * type: `string`
* defined in [Definitions](definitions.schema.md#id-1) * defined in [Definitions](definitions.schema.md#id-1)
...@@ -142,6 +151,7 @@ A unique identifier given to every addressable thing. ...@@ -142,6 +151,7 @@ A unique identifier given to every addressable thing.
`string` `string`
* format: `uri-reference` – URI Reference (according to [RFC3986](https://tools.ietf.org/html/rfc3986)) * format: `uri-reference` – URI Reference (according to [RFC3986](https://tools.ietf.org/html/rfc3986))
...@@ -154,6 +164,7 @@ A unique identifier given to every addressable thing. ...@@ -154,6 +164,7 @@ A unique identifier given to every addressable thing.
An about ids. It is meta. If you are confused, send an email to the address specified in this property value. An about ids. It is meta. If you are confused, send an email to the address specified in this property value.
`meta:id` `meta:id`
* is optional * is optional
* type: `string` * type: `string`
* defined in [Definitions](definitions.schema.md#metaid) * defined in [Definitions](definitions.schema.md#metaid)
...@@ -162,6 +173,7 @@ An about ids. It is meta. If you are confused, send an email to the address spec ...@@ -162,6 +173,7 @@ An about ids. It is meta. If you are confused, send an email to the address spec
`string` `string`
* format: `email` – email address (according to [RFC 5322, section 3.4.1](https://tools.ietf.org/html/rfc5322)) * format: `email` – email address (according to [RFC 5322, section 3.4.1](https://tools.ietf.org/html/rfc5322))
......
...@@ -46,6 +46,7 @@ aks. ...@@ -46,6 +46,7 @@ aks.
An `id` with an `@` in front of it. The `@` stands for "dot com" An `id` with an `@` in front of it. The `@` stands for "dot com"
`@id` `@id`
* is optional * is optional
* type: `string` * type: `string`
* defined in this schema * defined in this schema
...@@ -54,6 +55,7 @@ An `id` with an `@` in front of it. The `@` stands for "dot com" ...@@ -54,6 +55,7 @@ An `id` with an `@` in front of it. The `@` stands for "dot com"
`string` `string`
* format: `uri` – Uniformous Resource Identifier (according to [RFC3986](http://tools.ietf.org/html/rfc3986)) * format: `uri` – Uniformous Resource Identifier (according to [RFC3986](http://tools.ietf.org/html/rfc3986))
...@@ -66,6 +68,7 @@ An `id` with an `@` in front of it. The `@` stands for "dot com" ...@@ -66,6 +68,7 @@ An `id` with an `@` in front of it. The `@` stands for "dot com"
A unique identifier given to every addressable thing. A unique identifier given to every addressable thing.
`id` `id`
* is **required** * is **required**
* type: `string` * type: `string`
* defined in this schema * defined in this schema
...@@ -74,6 +77,7 @@ A unique identifier given to every addressable thing. ...@@ -74,6 +77,7 @@ A unique identifier given to every addressable thing.
`string` `string`
* format: `uri-reference` – URI Reference (according to [RFC3986](https://tools.ietf.org/html/rfc3986)) * format: `uri-reference` – URI Reference (according to [RFC3986](https://tools.ietf.org/html/rfc3986))
...@@ -86,6 +90,7 @@ A unique identifier given to every addressable thing. ...@@ -86,6 +90,7 @@ A unique identifier given to every addressable thing.
An about ids. It is meta. If you are confused, send an email to the address specified in this property value. An about ids. It is meta. If you are confused, send an email to the address specified in this property value.
`meta:id` `meta:id`
* is optional * is optional
* type: `string` * type: `string`
* defined in this schema * defined in this schema
...@@ -94,6 +99,7 @@ An about ids. It is meta. If you are confused, send an email to the address spec ...@@ -94,6 +99,7 @@ An about ids. It is meta. If you are confused, send an email to the address spec
`string` `string`
* format: `email` – email address (according to [RFC 5322, section 3.4.1](https://tools.ietf.org/html/rfc5322)) * format: `email` – email address (according to [RFC 5322, section 3.4.1](https://tools.ietf.org/html/rfc5322))
......
...@@ -28,6 +28,7 @@ This is an example schema with examples for properties with enum values ...@@ -28,6 +28,7 @@ This is an example schema with examples for properties with enum values
A simple string. Pick a value. A simple string. Pick a value.
`hello` `hello`
* is **required** * is **required**
* type: `enum` * type: `enum`
* defined in this schema * defined in this schema
...@@ -49,6 +50,7 @@ The value of this property **must** be equal to one of the [known values below]( ...@@ -49,6 +50,7 @@ The value of this property **must** be equal to one of the [known values below](
This is an example schema with examples for properties of nested objects with enum values This is an example schema with examples for properties of nested objects with enum values
`nested` `nested`
* is optional * is optional
* type: `object` * type: `object`
* defined in this schema * defined in this schema
...@@ -70,6 +72,7 @@ This is an example schema with examples for properties of nested objects with en ...@@ -70,6 +72,7 @@ This is an example schema with examples for properties of nested objects with en
A simple string. Pick a value. A simple string. Pick a value.
`test` `test`
* is optional * is optional
* type: `enum` * type: `enum`
......
...@@ -36,6 +36,7 @@ This is an example schema with examples. Too many examples? There can never be t ...@@ -36,6 +36,7 @@ This is an example schema with examples. Too many examples? There can never be t
A simple string. A simple string.
`bar` `bar`
* is optional * is optional
* type: `string` * type: `string`
* defined in this schema * defined in this schema
...@@ -49,6 +50,7 @@ A simple string. ...@@ -49,6 +50,7 @@ A simple string.
### bar Examples ### bar Examples
```json ```json
...@@ -66,6 +68,7 @@ A simple string. ...@@ -66,6 +68,7 @@ A simple string.
A simple string. A simple string.
`foo` `foo`
* is optional * is optional
* type: `string` * type: `string`
* defined in this schema * defined in this schema
...@@ -79,6 +82,7 @@ A simple string. ...@@ -79,6 +82,7 @@ A simple string.
### foo Example ### foo Example
```json ```json
......
...@@ -45,6 +45,7 @@ This is an example schema with *multiple* examples. Too many examples? There can ...@@ -45,6 +45,7 @@ This is an example schema with *multiple* examples. Too many examples? There can
A simple string. A simple string.
`bar` `bar`
* is **required** * is **required**
* type: `string` * type: `string`
* defined in this schema * defined in this schema
...@@ -58,6 +59,7 @@ A simple string. ...@@ -58,6 +59,7 @@ A simple string.
### bar Examples ### bar Examples
```json ```json
...@@ -75,6 +77,7 @@ A simple string. ...@@ -75,6 +77,7 @@ A simple string.
A simple string. A simple string.
`foo` `foo`
* is optional * is optional
* type: `string` * type: `string`
* defined in this schema * defined in this schema
...@@ -88,6 +91,7 @@ A simple string. ...@@ -88,6 +91,7 @@ A simple string.
### foo Example ### foo Example
```json ```json
......
...@@ -37,6 +37,7 @@ This is an extending schema. It pulls `definitions` from other schemas. ...@@ -37,6 +37,7 @@ This is an extending schema. It pulls `definitions` from other schemas.
An `id` with an `@` in front of it. The `@` stands for "dot com" An `id` with an `@` in front of it. The `@` stands for "dot com"
`@id` `@id`
* is optional * is optional
* type: `string` * type: `string`
* defined in [Definitions](definitions.schema.md#id) * defined in [Definitions](definitions.schema.md#id)
...@@ -45,6 +46,7 @@ An `id` with an `@` in front of it. The `@` stands for "dot com" ...@@ -45,6 +46,7 @@ An `id` with an `@` in front of it. The `@` stands for "dot com"
`string` `string`
* format: `uri` – Uniformous Resource Identifier (according to [RFC3986](http://tools.ietf.org/html/rfc3986)) * format: `uri` – Uniformous Resource Identifier (according to [RFC3986](http://tools.ietf.org/html/rfc3986))
...@@ -57,6 +59,7 @@ An `id` with an `@` in front of it. The `@` stands for "dot com" ...@@ -57,6 +59,7 @@ An `id` with an `@` in front of it. The `@` stands for "dot com"
A horse walks into it. A horse walks into it.
`bar` `bar`
* is optional * is optional
* type: `string` * type: `string`
* defined in [Extensible](extensible.schema.md#bar) * defined in [Extensible](extensible.schema.md#bar)
...@@ -70,6 +73,7 @@ A horse walks into it. ...@@ -70,6 +73,7 @@ A horse walks into it.
### bar Examples ### bar Examples
```json ```json
...@@ -88,6 +92,7 @@ A horse walks into it. ...@@ -88,6 +92,7 @@ A horse walks into it.
This property has a unique name to demonstrate it's uniqueness. This property has a unique name to demonstrate it's uniqueness.
`baz` `baz`
* is optional * is optional
* type: `string` * type: `string`
* defined in this schema * defined in this schema
...@@ -101,6 +106,7 @@ This property has a unique name to demonstrate it's uniqueness. ...@@ -101,6 +106,7 @@ This property has a unique name to demonstrate it's uniqueness.
### baz Example ### baz Example
```json ```json
...@@ -113,6 +119,7 @@ This property has a unique name to demonstrate it's uniqueness. ...@@ -113,6 +119,7 @@ This property has a unique name to demonstrate it's uniqueness.
A unique identifier given to every addressable thing. A unique identifier given to every addressable thing.
`id` `id`
* is optional * is optional
* type: `string` * type: `string`
* defined in [Definitions](definitions.schema.md#id-1) * defined in [Definitions](definitions.schema.md#id-1)
...@@ -121,6 +128,7 @@ A unique identifier given to every addressable thing. ...@@ -121,6 +128,7 @@ A unique identifier given to every addressable thing.
`string` `string`
* format: `uri-reference` – URI Reference (according to [RFC3986](https://tools.ietf.org/html/rfc3986)) * format: `uri-reference` – URI Reference (according to [RFC3986](https://tools.ietf.org/html/rfc3986))
...@@ -133,6 +141,7 @@ A unique identifier given to every addressable thing. ...@@ -133,6 +141,7 @@ A unique identifier given to every addressable thing.
An about ids. It is meta. If you are confused, send an email to the address specified in this property value. An about ids. It is meta. If you are confused, send an email to the address specified in this property value.
`meta:id` `meta:id`
* is optional * is optional
* type: `string` * type: `string`
* defined in [Definitions](definitions.schema.md#metaid) * defined in [Definitions](definitions.schema.md#metaid)
...@@ -141,6 +150,7 @@ An about ids. It is meta. If you are confused, send an email to the address spec ...@@ -141,6 +150,7 @@ An about ids. It is meta. If you are confused, send an email to the address spec
`string` `string`
* format: `email` – email address (according to [RFC 5322, section 3.4.1](https://tools.ietf.org/html/rfc5322)) * format: `email` – email address (according to [RFC 5322, section 3.4.1](https://tools.ietf.org/html/rfc5322))
......
...@@ -27,6 +27,7 @@ This is an extensible schema. It has `definitions`, that can be used in other sc ...@@ -27,6 +27,7 @@ This is an extensible schema. It has `definitions`, that can be used in other sc
A horse walks into it. A horse walks into it.
`bar` `bar`
* is optional * is optional
* type: `string` * type: `string`
* defined in this schema * defined in this schema
...@@ -40,6 +41,7 @@ A horse walks into it. ...@@ -40,6 +41,7 @@ A horse walks into it.
### bar Examples ### bar Examples
```json ```json
...@@ -57,6 +59,7 @@ A horse walks into it. ...@@ -57,6 +59,7 @@ A horse walks into it.
A unique identifier given to every addressable thing. A unique identifier given to every addressable thing.
`foo` `foo`
* is optional * is optional
* type: `string` * type: `string`
* defined in this schema * defined in this schema
...@@ -70,6 +73,7 @@ A unique identifier given to every addressable thing. ...@@ -70,6 +73,7 @@ A unique identifier given to every addressable thing.
### foo Example ### foo Example
```json ```json
......
...@@ -27,6 +27,7 @@ This is a *very* simple example of a JSON schema. There is only one property. ...@@ -27,6 +27,7 @@ This is a *very* simple example of a JSON schema. There is only one property.
A unique identifier given to every addressable thing. A unique identifier given to every addressable thing.
`@id` `@id`
* is optional * is optional
* type: `string` * type: `string`
* defined in this schema * defined in this schema
...@@ -35,6 +36,7 @@ A unique identifier given to every addressable thing. ...@@ -35,6 +36,7 @@ A unique identifier given to every addressable thing.
`string` `string`
* format: `uri` – Uniformous Resource Identifier (according to [RFC3986](http://tools.ietf.org/html/rfc3986)) * format: `uri` – Uniformous Resource Identifier (according to [RFC3986](http://tools.ietf.org/html/rfc3986))
......
...@@ -27,6 +27,7 @@ This is a *very* simple example of a JSON schema. There is only one property. ...@@ -27,6 +27,7 @@ This is a *very* simple example of a JSON schema. There is only one property.
A unique identifier given to every addressable thing. A unique identifier given to every addressable thing.
`id` `id`
* is optional * is optional
* type: `string` * type: `string`
* defined in this schema * defined in this schema
...@@ -35,6 +36,7 @@ A unique identifier given to every addressable thing. ...@@ -35,6 +36,7 @@ A unique identifier given to every addressable thing.
`string` `string`
* format: `uri` – Uniformous Resource Identifier (according to [RFC3986](http://tools.ietf.org/html/rfc3986)) * format: `uri` – Uniformous Resource Identifier (according to [RFC3986](http://tools.ietf.org/html/rfc3986))
......
...@@ -43,6 +43,7 @@ This is an example schema with examples for multiple types and their constraints ...@@ -43,6 +43,7 @@ This is an example schema with examples for multiple types and their constraints
Guess what number is valid Guess what number is valid
`integer_threes` `integer_threes`
* is optional * is optional
* type: `integer` * type: `integer`
* defined in this schema * defined in this schema
...@@ -51,6 +52,7 @@ Guess what number is valid ...@@ -51,6 +52,7 @@ Guess what number is valid
`integer` `integer`
* minimum value: `2` * minimum value: `2`
* maximum value: `4` * maximum value: `4`
* must be a multiple of `3` * must be a multiple of `3`
...@@ -64,6 +66,7 @@ Guess what number is valid ...@@ -64,6 +66,7 @@ Guess what number is valid
Just a whole number. I don't like fractions. Don't get too small Just a whole number. I don't like fractions. Don't get too small
`interger_constrained` `interger_constrained`
* is optional * is optional
* type: `integer` * type: `integer`
* defined in this schema * defined in this schema
...@@ -72,6 +75,7 @@ Just a whole number. I don't like fractions. Don't get too small ...@@ -72,6 +75,7 @@ Just a whole number. I don't like fractions. Don't get too small
`integer` `integer`
* minimum value: `10` * minimum value: `10`
...@@ -84,6 +88,7 @@ Just a whole number. I don't like fractions. Don't get too small ...@@ -84,6 +88,7 @@ Just a whole number. I don't like fractions. Don't get too small
Just a whole number. I don't like fractions. Just a whole number. I don't like fractions.
`interger_unconstrained` `interger_unconstrained`
* is optional * is optional
* type: `integer` * type: `integer`
* defined in this schema * defined in this schema
...@@ -98,11 +103,13 @@ Just a whole number. I don't like fractions. ...@@ -98,11 +103,13 @@ Just a whole number. I don't like fractions.
## number_constrained ## number_constrained
Just a number. Don't get too big. Just a number. Don't get too big.
`number_constrained` `number_constrained`
* is optional * is optional
* type: `number` * type: `number`
* defined in this schema * defined in this schema
...@@ -111,6 +118,7 @@ Just a number. Don't get too big. ...@@ -111,6 +118,7 @@ Just a number. Don't get too big.
`number` `number`
* value must not be greater or equal than: `10` * value must not be greater or equal than: `10`
...@@ -122,6 +130,7 @@ Just a number. Don't get too big. ...@@ -122,6 +130,7 @@ Just a number. Don't get too big.
Just a number Just a number
`number_unconstrained` `number_unconstrained`
* is optional * is optional
* type: `number` * type: `number`
* defined in this schema * defined in this schema
...@@ -136,11 +145,13 @@ Just a number ...@@ -136,11 +145,13 @@ Just a number
## string_date ## string_date
A date-like string. A date-like string.
`string_date` `string_date`
* is optional * is optional
* type: `string` * type: `string`
* defined in this schema * defined in this schema
...@@ -149,6 +160,7 @@ A date-like string. ...@@ -149,6 +160,7 @@ A date-like string.
`string` `string`
* format: `date-time` – date and time (according to [RFC 3339, section 5.6](http://tools.ietf.org/html/rfc3339)) * format: `date-time` – date and time (according to [RFC 3339, section 5.6](http://tools.ietf.org/html/rfc3339))
...@@ -161,6 +173,7 @@ A date-like string. ...@@ -161,6 +173,7 @@ A date-like string.
An email-like string. An email-like string.
`string_email` `string_email`
* is optional * is optional
* type: `string` * type: `string`
* defined in this schema * defined in this schema
...@@ -169,6 +182,7 @@ An email-like string. ...@@ -169,6 +182,7 @@ An email-like string.
`string` `string`
* format: `email` – email address (according to [RFC 5322, section 3.4.1](https://tools.ietf.org/html/rfc5322)) * format: `email` – email address (according to [RFC 5322, section 3.4.1](https://tools.ietf.org/html/rfc5322))
...@@ -181,6 +195,7 @@ An email-like string. ...@@ -181,6 +195,7 @@ An email-like string.
A hostname-like string. A hostname-like string.
`string_hostname` `string_hostname`
* is optional * is optional
* type: `string` * type: `string`
* defined in this schema * defined in this schema
...@@ -189,6 +204,7 @@ A hostname-like string. ...@@ -189,6 +204,7 @@ A hostname-like string.
`string` `string`
* format: `hostname` – Domain Name (according to [RFC 1034, section 3.1](https://tools.ietf.org/html/rfc1034)) * format: `hostname` – Domain Name (according to [RFC 1034, section 3.1](https://tools.ietf.org/html/rfc1034))
...@@ -201,6 +217,7 @@ A hostname-like string. ...@@ -201,6 +217,7 @@ A hostname-like string.
An IPv4-like string. An IPv4-like string.
`string_ipv4` `string_ipv4`
* is optional * is optional
* type: `string` * type: `string`
* defined in this schema * defined in this schema
...@@ -209,6 +226,7 @@ An IPv4-like string. ...@@ -209,6 +226,7 @@ An IPv4-like string.
`string` `string`
* format: `ipv4` – IP (v4) address (according to [RFC 2673, section 3.2](https://tools.ietf.org/html/rfc2673)) * format: `ipv4` – IP (v4) address (according to [RFC 2673, section 3.2](https://tools.ietf.org/html/rfc2673))
...@@ -221,6 +239,7 @@ An IPv4-like string. ...@@ -221,6 +239,7 @@ An IPv4-like string.
An IPv6-like string. An IPv6-like string.
`string_ipv6` `string_ipv6`
* is optional * is optional
* type: `string` * type: `string`
* defined in this schema * defined in this schema
...@@ -229,6 +248,7 @@ An IPv6-like string. ...@@ -229,6 +248,7 @@ An IPv6-like string.
`string` `string`
* format: `ipv6` – IP (v6) address (according to [RFC 4291, section 2.2](https://tools.ietf.org/html/rfc4291)) * format: `ipv6` – IP (v6) address (according to [RFC 4291, section 2.2](https://tools.ietf.org/html/rfc4291))
...@@ -241,6 +261,7 @@ An IPv6-like string. ...@@ -241,6 +261,7 @@ An IPv6-like string.
A string with minumum and maximum length A string with minumum and maximum length
`string_length` `string_length`
* is optional * is optional
* type: `string` * type: `string`
* defined in this schema * defined in this schema
...@@ -249,6 +270,7 @@ A string with minumum and maximum length ...@@ -249,6 +270,7 @@ A string with minumum and maximum length
`string` `string`
* minimum length: 3 characters * minimum length: 3 characters
* maximum length: 3 characters * maximum length: 3 characters
...@@ -271,6 +293,7 @@ A string with minumum and maximum length ...@@ -271,6 +293,7 @@ A string with minumum and maximum length
A string following a regular expression A string following a regular expression
`string_pattern` `string_pattern`
* is optional * is optional
* type: `string` * type: `string`
* defined in this schema * defined in this schema
...@@ -281,6 +304,7 @@ A string following a regular expression ...@@ -281,6 +304,7 @@ A string following a regular expression
`string` `string`
All instances must conform to this regular expression All instances must conform to this regular expression
```regex ```regex
^ba.$ ^ba.$
...@@ -328,6 +352,7 @@ All instances must conform to this regular expression ...@@ -328,6 +352,7 @@ All instances must conform to this regular expression
A string following a regular expression A string following a regular expression
`string_pattern_noexample` `string_pattern_noexample`
* is optional * is optional
* type: `string` * type: `string`
* defined in this schema * defined in this schema
...@@ -338,6 +363,7 @@ A string following a regular expression ...@@ -338,6 +363,7 @@ A string following a regular expression
`string` `string`
All instances must conform to this regular expression All instances must conform to this regular expression
(test examples [here](https://regexr.com/?expression=%5Eba.%24)): (test examples [here](https://regexr.com/?expression=%5Eba.%24)):
```regex ```regex
...@@ -354,6 +380,7 @@ All instances must conform to this regular expression ...@@ -354,6 +380,7 @@ All instances must conform to this regular expression
A string following a regular expression A string following a regular expression
`string_pattern_singleexample` `string_pattern_singleexample`
* is optional * is optional
* type: `string` * type: `string`
* defined in this schema * defined in this schema
...@@ -364,6 +391,7 @@ A string following a regular expression ...@@ -364,6 +391,7 @@ A string following a regular expression
`string` `string`
All instances must conform to this regular expression All instances must conform to this regular expression
```regex ```regex
^ba.$ ^ba.$
...@@ -386,6 +414,7 @@ All instances must conform to this regular expression ...@@ -386,6 +414,7 @@ All instances must conform to this regular expression
A simple string, without any constraints. A simple string, without any constraints.
`string_unconstrained` `string_unconstrained`
* is optional * is optional
* type: `string` * type: `string`
* defined in this schema * defined in this schema
...@@ -399,6 +428,7 @@ A simple string, without any constraints. ...@@ -399,6 +428,7 @@ A simple string, without any constraints.
### string_unconstrained Example ### string_unconstrained Example
```json ```json
...@@ -411,6 +441,7 @@ A simple string, without any constraints. ...@@ -411,6 +441,7 @@ A simple string, without any constraints.
A URI. A URI.
`string_uri` `string_uri`
* is optional * is optional
* type: `string` * type: `string`
* defined in this schema * defined in this schema
...@@ -419,6 +450,7 @@ A URI. ...@@ -419,6 +450,7 @@ A URI.
`string` `string`
* format: `uri` – Uniformous Resource Identifier (according to [RFC3986](http://tools.ietf.org/html/rfc3986)) * format: `uri` – Uniformous Resource Identifier (according to [RFC3986](http://tools.ietf.org/html/rfc3986))
...@@ -430,6 +462,7 @@ A URI. ...@@ -430,6 +462,7 @@ A URI.
`yesno` `yesno`
* is **required** * is **required**
* type: `boolean` * type: `boolean`
* defined in this schema * defined in this schema
......
...@@ -27,6 +27,7 @@ This is a schema which is currently in the `stabilizing` status. ...@@ -27,6 +27,7 @@ This is a schema which is currently in the `stabilizing` status.
A unique identifier given to every addressable thing. A unique identifier given to every addressable thing.
`id` `id`
* is optional * is optional
* type: `string` * type: `string`
* defined in this schema * defined in this schema
...@@ -35,6 +36,7 @@ A unique identifier given to every addressable thing. ...@@ -35,6 +36,7 @@ A unique identifier given to every addressable thing.
`string` `string`
* format: `uri` – Uniformous Resource Identifier (according to [RFC3986](http://tools.ietf.org/html/rfc3986)) * format: `uri` – Uniformous Resource Identifier (according to [RFC3986](http://tools.ietf.org/html/rfc3986))
......
...@@ -26,6 +26,7 @@ A schema in a sub directory ...@@ -26,6 +26,7 @@ A schema in a sub directory
A unique identifier given to every addressable thing. A unique identifier given to every addressable thing.
`id` `id`
* is optional * is optional
* type: `string` * type: `string`
* defined in this schema * defined in this schema
...@@ -34,6 +35,7 @@ A unique identifier given to every addressable thing. ...@@ -34,6 +35,7 @@ A unique identifier given to every addressable thing.
`string` `string`
* format: `uri` – Uniformous Resource Identifier (according to [RFC3986](http://tools.ietf.org/html/rfc3986)) * format: `uri` – Uniformous Resource Identifier (according to [RFC3986](http://tools.ietf.org/html/rfc3986))
......
...@@ -28,6 +28,7 @@ This is an abstract schema. It has `definitions`, but does not declare any prope ...@@ -28,6 +28,7 @@ This is an abstract schema. It has `definitions`, but does not declare any prope
A unique identifier given to every addressable thing. A unique identifier given to every addressable thing.
`bar` `bar`
* is optional * is optional
* type: `string` * type: `string`
* defined in this schema * defined in this schema
...@@ -42,11 +43,13 @@ A unique identifier given to every addressable thing. ...@@ -42,11 +43,13 @@ A unique identifier given to every addressable thing.
## foo ## foo
A unique identifier given to every addressable thing. A unique identifier given to every addressable thing.
`foo` `foo`
* is optional * is optional
* type: `string` * type: `string`
* defined in this schema * defined in this schema
...@@ -61,11 +64,13 @@ A unique identifier given to every addressable thing. ...@@ -61,11 +64,13 @@ A unique identifier given to every addressable thing.
## nonfoo ## nonfoo
This is not foo. This is not foo.
`nonfoo` `nonfoo`
* is optional * is optional
* type: `const` * type: `const`
* defined in this schema * defined in this schema
......
...@@ -34,6 +34,7 @@ This is an example schema with examples for multiple array types and their const ...@@ -34,6 +34,7 @@ This is an example schema with examples for multiple array types and their const
This is an array This is an array
`boollist` `boollist`
* is optional * is optional
* type: `boolean[]` * type: `boolean[]`
* at least `1` items in the array * at least `1` items in the array
...@@ -58,6 +59,7 @@ All items must be of the type: ...@@ -58,6 +59,7 @@ All items must be of the type:
This is an array of coordinates in three-dimensional space. This is an array of coordinates in three-dimensional space.
`coordinatelist` `coordinatelist`
* is optional * is optional
* type: `number[][]` (nested array) * type: `number[][]` (nested array)
* no more than `10` items in the array * no more than `10` items in the array
...@@ -72,6 +74,7 @@ Nested array type: `number[]` ...@@ -72,6 +74,7 @@ Nested array type: `number[]`
All items must be of the type: All items must be of the type:
`number` `number`
* minimum value: `0` * minimum value: `0`
* maximum value: `10` * maximum value: `10`
...@@ -92,6 +95,7 @@ A coordinate, specified by `x`, `y`, and `z` values ...@@ -92,6 +95,7 @@ A coordinate, specified by `x`, `y`, and `z` values
This is an array This is an array
`intlist` `intlist`
* is optional * is optional
* type: `integer[]` * type: `integer[]`
* between `1` and `10` items in the array * between `1` and `10` items in the array
...@@ -113,14 +117,15 @@ All items must be of the type: ...@@ -113,14 +117,15 @@ All items must be of the type:
## list ## list
This is an array This is an array
`list` `list`
* is optional * is optional
* type: `string[]` * type: `string[]`
* defined in this schema * defined in this schema
### list Type ### list Type
...@@ -139,14 +144,15 @@ All items must be of the type: ...@@ -139,14 +144,15 @@ All items must be of the type:
## listlist ## listlist
This is an array of arrays This is an array of arrays
`listlist` `listlist`
* is optional * is optional
* type: `array[]` (nested array) * type: `array[]` (nested array)
* defined in this schema * defined in this schema
### listlist Type ### listlist Type
...@@ -168,6 +174,7 @@ Nested array type: `array` ...@@ -168,6 +174,7 @@ Nested array type: `array`
This is an array This is an array
`numlist` `numlist`
* is optional * is optional
* type: `number[]` * type: `number[]`
* no more than `10` items in the array * no more than `10` items in the array
...@@ -180,6 +187,7 @@ Array type: `number[]` ...@@ -180,6 +187,7 @@ Array type: `number[]`
All items must be of the type: All items must be of the type:
`number` `number`
* minimum value: `10` * minimum value: `10`
...@@ -194,9 +202,9 @@ All items must be of the type: ...@@ -194,9 +202,9 @@ All items must be of the type:
An array of simple objects An array of simple objects
`objectlist` `objectlist`
* is optional * is optional
* type: `object[]` * type: `object[]`
* defined in this schema * defined in this schema
### objectlist Type ### objectlist Type
...@@ -220,6 +228,7 @@ All items must be of the type: ...@@ -220,6 +228,7 @@ All items must be of the type:
The a property The a property
`a` `a`
* is **required** * is **required**
* type: `string` * type: `string`
...@@ -235,11 +244,13 @@ The a property ...@@ -235,11 +244,13 @@ The a property
#### b #### b
The b property The b property
`b` `b`
* is optional * is optional
* type: `integer` * type: `integer`
...@@ -261,14 +272,15 @@ The b property ...@@ -261,14 +272,15 @@ The b property
## stringlistlist ## stringlistlist
This is an array of arrays of strings This is an array of arrays of strings
`stringlistlist` `stringlistlist`
* is optional * is optional
* type: `string[][]` (nested array) * type: `string[][]` (nested array)
* defined in this schema * defined in this schema
### stringlistlist Type ### stringlistlist Type
...@@ -290,3 +302,4 @@ All items must be of the type: ...@@ -290,3 +302,4 @@ All items must be of the type:
...@@ -40,6 +40,7 @@ This is an example schema that uses types defined in other schemas. ...@@ -40,6 +40,7 @@ This is an example schema that uses types defined in other schemas.
Number in a range Number in a range
`and` `and`
* is optional * is optional
* type: complex * type: complex
* defined in this schema * defined in this schema
...@@ -54,6 +55,7 @@ Number in a range ...@@ -54,6 +55,7 @@ Number in a range
`number` `number`
* maximum value: `10` * maximum value: `10`
...@@ -61,6 +63,7 @@ Number in a range ...@@ -61,6 +63,7 @@ Number in a range
`number` `number`
* minimum value: `0` * minimum value: `0`
...@@ -74,6 +77,7 @@ Number in a range ...@@ -74,6 +77,7 @@ Number in a range
String or number… String or number…
`or` `or`
* is optional * is optional
* type: complex * type: complex
* defined in this schema * defined in this schema
...@@ -91,10 +95,12 @@ String or number… ...@@ -91,10 +95,12 @@ String or number…
#### Option 2 #### Option 2
`number` `number`
* minimum value: `0` * minimum value: `0`
...@@ -107,6 +113,7 @@ String or number… ...@@ -107,6 +113,7 @@ String or number…
`refabstract` `refabstract`
* is **required** * is **required**
* type: `object` * type: `object`
* defined in this schema * defined in this schema
...@@ -129,6 +136,7 @@ String or number… ...@@ -129,6 +136,7 @@ String or number…
A unique identifier given to every addressable thing. A unique identifier given to every addressable thing.
`foo` `foo`
* is optional * is optional
* type: `string` * type: `string`
...@@ -144,11 +152,13 @@ A unique identifier given to every addressable thing. ...@@ -144,11 +152,13 @@ A unique identifier given to every addressable thing.
#### nonfoo #### nonfoo
This is not foo. This is not foo.
`nonfoo` `nonfoo`
* is optional * is optional
* type: `const` * type: `const`
...@@ -171,9 +181,9 @@ false ...@@ -171,9 +181,9 @@ false
`reflist` `reflist`
* is optional * is optional
* type: Simple * type: Simple
* defined in this schema * defined in this schema
### reflist Type ### reflist Type
...@@ -195,6 +205,7 @@ All items must be of the type: ...@@ -195,6 +205,7 @@ All items must be of the type:
`refnamed` `refnamed`
* is optional * is optional
* type: Simple * type: Simple
* defined in this schema * defined in this schema
...@@ -213,6 +224,7 @@ All items must be of the type: ...@@ -213,6 +224,7 @@ All items must be of the type:
Exclusive choice. Exclusive choice.
`xor` `xor`
* is optional * is optional
* type: complex * type: complex
* defined in this schema * defined in this schema
...@@ -227,6 +239,7 @@ Exclusive choice. ...@@ -227,6 +239,7 @@ Exclusive choice.
`number` `number`
* maximum value: `0` * maximum value: `0`
...@@ -234,6 +247,7 @@ Exclusive choice. ...@@ -234,6 +247,7 @@ Exclusive choice.
`number` `number`
* minimum value: `10` * minimum value: `10`
...@@ -247,6 +261,7 @@ Applies to all properties that match the regular expression `int.*` ...@@ -247,6 +261,7 @@ Applies to all properties that match the regular expression `int.*`
`int.*` `int.*`
* is a property pattern * is a property pattern
* type: `integer` * type: `integer`
* defined in this schema * defined in this schema
...@@ -261,11 +276,13 @@ Applies to all properties that match the regular expression `int.*` ...@@ -261,11 +276,13 @@ Applies to all properties that match the regular expression `int.*`
## Pattern: `str.*` ## Pattern: `str.*`
Applies to all properties that match the regular expression `str.*` Applies to all properties that match the regular expression `str.*`
`str.*` `str.*`
* is a property pattern * is a property pattern
* type: `string` * type: `string`
* defined in this schema * defined in this schema
...@@ -279,3 +296,4 @@ Applies to all properties that match the regular expression `str.*` ...@@ -279,3 +296,4 @@ Applies to all properties that match the regular expression `str.*`
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment