diff --git a/examples/docs/abstract.schema.md b/examples/docs/abstract.schema.md index fdd7b672ec7e4aeebbbc85ce0a7747324c768210..1911188a7774bf095e195faf5c8989b48e229ec1 100644 --- a/examples/docs/abstract.schema.md +++ b/examples/docs/abstract.schema.md @@ -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. `bar` + * is optional * type: `string` * defined in this schema @@ -42,11 +43,13 @@ A unique identifier given to every addressable thing. + ## foo A unique identifier given to every addressable thing. `foo` + * is optional * type: `string` * defined in this schema @@ -61,11 +64,13 @@ A unique identifier given to every addressable thing. + ## nonfoo This is not foo. `nonfoo` + * is optional * type: `const` * defined in this schema diff --git a/examples/docs/arrays.schema.md b/examples/docs/arrays.schema.md index 74c7371d70d4b971396de79f67f032f5856ca1ce..a20bb6563b596a747bdaa3393ba2001ec6008acb 100644 --- a/examples/docs/arrays.schema.md +++ b/examples/docs/arrays.schema.md @@ -34,6 +34,7 @@ This is an example schema with examples for multiple array types and their const This is an array `boollist` + * is optional * type: `boolean[]` * at least `1` items in the array @@ -58,6 +59,7 @@ All items must be of the type: This is an array of coordinates in three-dimensional space. `coordinatelist` + * is optional * type: `number[][]` (nested array) * no more than `10` items in the array @@ -72,6 +74,7 @@ Nested array type: `number[]` All items must be of the type: `number` + * minimum value: `0` * maximum value: `10` @@ -92,6 +95,7 @@ A coordinate, specified by `x`, `y`, and `z` values This is an array `intlist` + * is optional * type: `integer[]` * between `1` and `10` items in the array @@ -113,14 +117,15 @@ All items must be of the type: + ## list This is an array `list` + * is optional * type: `string[]` - * defined in this schema ### list Type @@ -139,14 +144,15 @@ All items must be of the type: + ## listlist This is an array of arrays `listlist` + * is optional * type: `array[]` (nested array) - * defined in this schema ### listlist Type @@ -168,6 +174,7 @@ Nested array type: `array` This is an array `numlist` + * is optional * type: `number[]` * no more than `10` items in the array @@ -180,6 +187,7 @@ Array type: `number[]` All items must be of the type: `number` + * minimum value: `10` @@ -194,9 +202,9 @@ All items must be of the type: An array of simple objects `objectlist` + * is optional * type: `object[]` - * defined in this schema ### objectlist Type @@ -220,6 +228,7 @@ All items must be of the type: The a property `a` + * is **required** * type: `string` @@ -235,11 +244,13 @@ The a property + #### b The b property `b` + * is optional * type: `integer` @@ -261,14 +272,15 @@ The b property + ## stringlistlist This is an array of arrays of strings `stringlistlist` + * is optional * type: `string[][]` (nested array) - * defined in this schema ### stringlistlist Type @@ -290,3 +302,4 @@ All items must be of the type: + diff --git a/examples/docs/complex.schema.md b/examples/docs/complex.schema.md index c813c30a2b0237ed74f602ea640e171cff2bdac2..680809525d9515597f9cce32a66c296be72c35a6 100644 --- a/examples/docs/complex.schema.md +++ b/examples/docs/complex.schema.md @@ -40,6 +40,7 @@ This is an example schema that uses types defined in other schemas. Number in a range `and` + * is optional * type: complex * defined in this schema @@ -54,6 +55,7 @@ Number in a range `number` + * maximum value: `10` @@ -61,6 +63,7 @@ Number in a range `number` + * minimum value: `0` @@ -74,6 +77,7 @@ Number in a range String or number… `or` + * is optional * type: complex * defined in this schema @@ -91,10 +95,12 @@ String or number… + #### Option 2 `number` + * minimum value: `0` @@ -107,6 +113,7 @@ String or number… `refabstract` + * is **required** * type: `object` * defined in this schema @@ -129,6 +136,7 @@ String or number… A unique identifier given to every addressable thing. `foo` + * is optional * type: `string` @@ -144,11 +152,13 @@ A unique identifier given to every addressable thing. + #### nonfoo This is not foo. `nonfoo` + * is optional * type: `const` @@ -171,9 +181,9 @@ false `reflist` + * is optional * type: Simple - * defined in this schema ### reflist Type @@ -195,6 +205,7 @@ All items must be of the type: `refnamed` + * is optional * type: Simple * defined in this schema @@ -213,6 +224,7 @@ All items must be of the type: Exclusive choice. `xor` + * is optional * type: complex * defined in this schema @@ -227,6 +239,7 @@ Exclusive choice. `number` + * maximum value: `0` @@ -234,6 +247,7 @@ Exclusive choice. `number` + * minimum value: `10` @@ -247,6 +261,7 @@ Applies to all properties that match the regular expression `int.*` `int.*` + * is a property pattern * type: `integer` * defined in this schema @@ -261,11 +276,13 @@ Applies to all properties that match the regular expression `int.*` + ## Pattern: `str.*` Applies to all properties that match the regular expression `str.*` `str.*` + * is a property pattern * type: `string` * defined in this schema @@ -279,3 +296,4 @@ Applies to all properties that match the regular expression `str.*` + diff --git a/examples/docs/constants.schema.md b/examples/docs/constants.schema.md index cf4c3870e8783b26e91e350fb9c988f41215df13..03c8088286ea94d244804cf23398edad2f236d61 100644 --- a/examples/docs/constants.schema.md +++ b/examples/docs/constants.schema.md @@ -27,6 +27,7 @@ This is an example schema with examples for properties with constant values A simple string, without strong constraints. `hello` + * is **required** * type: `const` * defined in this schema diff --git a/examples/docs/custom.schema.md b/examples/docs/custom.schema.md index d2971e16b2c3fd8449f0b75bc80eac5c4229d552..17e616c46d9b55e2ad26e345ead1fd24b941c667 100644 --- a/examples/docs/custom.schema.md +++ b/examples/docs/custom.schema.md @@ -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. `bar` + * is optional * type: `string` * defined in this schema @@ -42,11 +43,13 @@ A unique identifier given to every addressable thing. + ## foo A unique identifier given to every addressable thing. `foo` + * is optional * type: `string` * defined in this schema @@ -60,3 +63,4 @@ A unique identifier given to every addressable thing. + diff --git a/examples/docs/deepextending.schema.md b/examples/docs/deepextending.schema.md index 4ec03594460cfb8dfb90cb8bd45ee3848014cb05..cdde5af1ce3441f3ca45a3e613db2d5f08421815 100644 --- a/examples/docs/deepextending.schema.md +++ b/examples/docs/deepextending.schema.md @@ -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" `@id` + * is optional * type: `string` * defined in [Definitions](definitions.schema.md#id) @@ -47,6 +48,7 @@ An `id` with an `@` in front of it. The `@` stands for "dot com" `string` + * 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" A horse walks into it. `bar` + * is optional * type: `string` * defined in [Extensible](extensible.schema.md#bar) @@ -72,6 +75,7 @@ A horse walks into it. + ### bar Examples ```json @@ -90,6 +94,7 @@ A horse walks into it. This property has a unique name to demonstrate it's uniqueness. `baz` + * is optional * type: `string` * defined in [Extending](extending.schema.md#baz) @@ -103,6 +108,7 @@ This property has a unique name to demonstrate it's uniqueness. + ### baz Example ```json @@ -115,6 +121,7 @@ This property has a unique name to demonstrate it's uniqueness. A unique identifier given to every addressable thing. `hey` + * is optional * type: `string` * defined in this schema @@ -129,11 +136,13 @@ A unique identifier given to every addressable thing. + ## id A unique identifier given to every addressable thing. `id` + * is optional * type: `string` * defined in [Definitions](definitions.schema.md#id-1) @@ -142,6 +151,7 @@ A unique identifier given to every addressable thing. `string` + * 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. An about ids. It is meta. If you are confused, send an email to the address specified in this property value. `meta:id` + * is optional * type: `string` * 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 `string` + * format: `email` – email address (according to [RFC 5322, section 3.4.1](https://tools.ietf.org/html/rfc5322)) diff --git a/examples/docs/definitions.schema.md b/examples/docs/definitions.schema.md index 0054a2ea8b065dffdc76a0e18390be3a6b7b1b7c..4f9240e146a348423493dffd81c7f27ea45d3810 100644 --- a/examples/docs/definitions.schema.md +++ b/examples/docs/definitions.schema.md @@ -46,6 +46,7 @@ aks. An `id` with an `@` in front of it. The `@` stands for "dot com" `@id` + * is optional * type: `string` * defined in this schema @@ -54,6 +55,7 @@ An `id` with an `@` in front of it. The `@` stands for "dot com" `string` + * 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" A unique identifier given to every addressable thing. `id` + * is **required** * type: `string` * defined in this schema @@ -74,6 +77,7 @@ A unique identifier given to every addressable thing. `string` + * 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. An about ids. It is meta. If you are confused, send an email to the address specified in this property value. `meta:id` + * is optional * type: `string` * 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 `string` + * format: `email` – email address (according to [RFC 5322, section 3.4.1](https://tools.ietf.org/html/rfc5322)) diff --git a/examples/docs/enums.schema.md b/examples/docs/enums.schema.md index 93d471654eadb7897b966a61b9482d20f0aadde0..57d97014ac5c57e903e53a4a537c7fa4cda8d91a 100644 --- a/examples/docs/enums.schema.md +++ b/examples/docs/enums.schema.md @@ -28,6 +28,7 @@ This is an example schema with examples for properties with enum values A simple string. Pick a value. `hello` + * is **required** * type: `enum` * defined in this schema @@ -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 `nested` + * is optional * type: `object` * defined in this schema @@ -70,6 +72,7 @@ This is an example schema with examples for properties of nested objects with en A simple string. Pick a value. `test` + * is optional * type: `enum` diff --git a/examples/docs/example.schema.md b/examples/docs/example.schema.md index 39a7d67437492bdde4b4f4185e39440f20a2d0fd..90979823352fc7ecbd2153b2edbaf4d8b9e07939 100644 --- a/examples/docs/example.schema.md +++ b/examples/docs/example.schema.md @@ -36,6 +36,7 @@ This is an example schema with examples. Too many examples? There can never be t A simple string. `bar` + * is optional * type: `string` * defined in this schema @@ -49,6 +50,7 @@ A simple string. + ### bar Examples ```json @@ -66,6 +68,7 @@ A simple string. A simple string. `foo` + * is optional * type: `string` * defined in this schema @@ -79,6 +82,7 @@ A simple string. + ### foo Example ```json diff --git a/examples/docs/examples.schema.md b/examples/docs/examples.schema.md index 5d4aa2ca7ebfed62be546e3be03db4211728114f..c3ec772d10763a576196936519abc09b994660de 100644 --- a/examples/docs/examples.schema.md +++ b/examples/docs/examples.schema.md @@ -45,6 +45,7 @@ This is an example schema with *multiple* examples. Too many examples? There can A simple string. `bar` + * is **required** * type: `string` * defined in this schema @@ -58,6 +59,7 @@ A simple string. + ### bar Examples ```json @@ -75,6 +77,7 @@ A simple string. A simple string. `foo` + * is optional * type: `string` * defined in this schema @@ -88,6 +91,7 @@ A simple string. + ### foo Example ```json diff --git a/examples/docs/extending.schema.md b/examples/docs/extending.schema.md index bc55d8728ab2bd21963f8cfe51e009bb500fb1d3..90ee58cd98320177afc2b760a76dc5030fba5fbb 100644 --- a/examples/docs/extending.schema.md +++ b/examples/docs/extending.schema.md @@ -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" `@id` + * is optional * type: `string` * defined in [Definitions](definitions.schema.md#id) @@ -45,6 +46,7 @@ An `id` with an `@` in front of it. The `@` stands for "dot com" `string` + * 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" A horse walks into it. `bar` + * is optional * type: `string` * defined in [Extensible](extensible.schema.md#bar) @@ -70,6 +73,7 @@ A horse walks into it. + ### bar Examples ```json @@ -88,6 +92,7 @@ A horse walks into it. This property has a unique name to demonstrate it's uniqueness. `baz` + * is optional * type: `string` * defined in this schema @@ -101,6 +106,7 @@ This property has a unique name to demonstrate it's uniqueness. + ### baz Example ```json @@ -113,6 +119,7 @@ This property has a unique name to demonstrate it's uniqueness. A unique identifier given to every addressable thing. `id` + * is optional * type: `string` * defined in [Definitions](definitions.schema.md#id-1) @@ -121,6 +128,7 @@ A unique identifier given to every addressable thing. `string` + * 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. An about ids. It is meta. If you are confused, send an email to the address specified in this property value. `meta:id` + * is optional * type: `string` * 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 `string` + * format: `email` – email address (according to [RFC 5322, section 3.4.1](https://tools.ietf.org/html/rfc5322)) diff --git a/examples/docs/extensible.schema.md b/examples/docs/extensible.schema.md index edf1e5c40b6a066377bf253109734ebb4969d33d..e95a7e374b866e8868b080306fcac5faf5d0d4c5 100644 --- a/examples/docs/extensible.schema.md +++ b/examples/docs/extensible.schema.md @@ -27,6 +27,7 @@ This is an extensible schema. It has `definitions`, that can be used in other sc A horse walks into it. `bar` + * is optional * type: `string` * defined in this schema @@ -40,6 +41,7 @@ A horse walks into it. + ### bar Examples ```json @@ -57,6 +59,7 @@ A horse walks into it. A unique identifier given to every addressable thing. `foo` + * is optional * type: `string` * defined in this schema @@ -70,6 +73,7 @@ A unique identifier given to every addressable thing. + ### foo Example ```json diff --git a/examples/docs/identifiable.schema.md b/examples/docs/identifiable.schema.md index d0dc69e4a00ffed1196ddf4ca847191b8427e317..f081f5c4cfe8e32c4259e32608c0e5a4cdad2135 100644 --- a/examples/docs/identifiable.schema.md +++ b/examples/docs/identifiable.schema.md @@ -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. `@id` + * is optional * type: `string` * defined in this schema @@ -35,6 +36,7 @@ A unique identifier given to every addressable thing. `string` + * format: `uri` – Uniformous Resource Identifier (according to [RFC3986](http://tools.ietf.org/html/rfc3986)) diff --git a/examples/docs/simple.schema.md b/examples/docs/simple.schema.md index b801c02f404115e1ccfe9d8e24186df46e6ce035..1278f91e010b0c08d2eeee26ce3d00e22474e53a 100644 --- a/examples/docs/simple.schema.md +++ b/examples/docs/simple.schema.md @@ -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. `id` + * is optional * type: `string` * defined in this schema @@ -35,6 +36,7 @@ A unique identifier given to every addressable thing. `string` + * format: `uri` – Uniformous Resource Identifier (according to [RFC3986](http://tools.ietf.org/html/rfc3986)) diff --git a/examples/docs/simpletypes.schema.md b/examples/docs/simpletypes.schema.md index b030c5ad4cb58776086a4d92a35b764a00199f4e..fb4c47d4b07a493e9cb56f1ac7b89648c9753aa2 100644 --- a/examples/docs/simpletypes.schema.md +++ b/examples/docs/simpletypes.schema.md @@ -43,6 +43,7 @@ This is an example schema with examples for multiple types and their constraints Guess what number is valid `integer_threes` + * is optional * type: `integer` * defined in this schema @@ -51,6 +52,7 @@ Guess what number is valid `integer` + * minimum value: `2` * maximum value: `4` * must be a multiple of `3` @@ -64,6 +66,7 @@ Guess what number is valid Just a whole number. I don't like fractions. Don't get too small `interger_constrained` + * is optional * type: `integer` * defined in this schema @@ -72,6 +75,7 @@ Just a whole number. I don't like fractions. Don't get too small `integer` + * minimum value: `10` @@ -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. `interger_unconstrained` + * is optional * type: `integer` * defined in this schema @@ -98,11 +103,13 @@ Just a whole number. I don't like fractions. + ## number_constrained Just a number. Don't get too big. `number_constrained` + * is optional * type: `number` * defined in this schema @@ -111,6 +118,7 @@ Just a number. Don't get too big. `number` + * value must not be greater or equal than: `10` @@ -122,6 +130,7 @@ Just a number. Don't get too big. Just a number `number_unconstrained` + * is optional * type: `number` * defined in this schema @@ -136,11 +145,13 @@ Just a number + ## string_date A date-like string. `string_date` + * is optional * type: `string` * defined in this schema @@ -149,6 +160,7 @@ A date-like string. `string` + * 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. An email-like string. `string_email` + * is optional * type: `string` * defined in this schema @@ -169,6 +182,7 @@ An email-like string. `string` + * 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. A hostname-like string. `string_hostname` + * is optional * type: `string` * defined in this schema @@ -189,6 +204,7 @@ A hostname-like string. `string` + * 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. An IPv4-like string. `string_ipv4` + * is optional * type: `string` * defined in this schema @@ -209,6 +226,7 @@ An IPv4-like string. `string` + * 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. An IPv6-like string. `string_ipv6` + * is optional * type: `string` * defined in this schema @@ -229,6 +248,7 @@ An IPv6-like string. `string` + * 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. A string with minumum and maximum length `string_length` + * is optional * type: `string` * defined in this schema @@ -249,6 +270,7 @@ A string with minumum and maximum length `string` + * minimum length: 3 characters * maximum length: 3 characters @@ -271,6 +293,7 @@ A string with minumum and maximum length A string following a regular expression `string_pattern` + * is optional * type: `string` * defined in this schema @@ -281,6 +304,7 @@ A string following a regular expression `string` + All instances must conform to this regular expression ```regex ^ba.$ @@ -328,6 +352,7 @@ All instances must conform to this regular expression A string following a regular expression `string_pattern_noexample` + * is optional * type: `string` * defined in this schema @@ -338,6 +363,7 @@ A string following a regular expression `string` + All instances must conform to this regular expression (test examples [here](https://regexr.com/?expression=%5Eba.%24)): ```regex @@ -354,6 +380,7 @@ All instances must conform to this regular expression A string following a regular expression `string_pattern_singleexample` + * is optional * type: `string` * defined in this schema @@ -364,6 +391,7 @@ A string following a regular expression `string` + All instances must conform to this regular expression ```regex ^ba.$ @@ -386,6 +414,7 @@ All instances must conform to this regular expression A simple string, without any constraints. `string_unconstrained` + * is optional * type: `string` * defined in this schema @@ -399,6 +428,7 @@ A simple string, without any constraints. + ### string_unconstrained Example ```json @@ -411,6 +441,7 @@ A simple string, without any constraints. A URI. `string_uri` + * is optional * type: `string` * defined in this schema @@ -419,6 +450,7 @@ A URI. `string` + * format: `uri` – Uniformous Resource Identifier (according to [RFC3986](http://tools.ietf.org/html/rfc3986)) @@ -430,6 +462,7 @@ A URI. `yesno` + * is **required** * type: `boolean` * defined in this schema diff --git a/examples/docs/stabilizing.schema.md b/examples/docs/stabilizing.schema.md index cc1a08297d82e3ca6e383a8fcb6900b60d2f4403..21c3998e97c8e6f2c7da4af22e6cacc326498655 100644 --- a/examples/docs/stabilizing.schema.md +++ b/examples/docs/stabilizing.schema.md @@ -27,6 +27,7 @@ This is a schema which is currently in the `stabilizing` status. A unique identifier given to every addressable thing. `id` + * is optional * type: `string` * defined in this schema @@ -35,6 +36,7 @@ A unique identifier given to every addressable thing. `string` + * format: `uri` – Uniformous Resource Identifier (according to [RFC3986](http://tools.ietf.org/html/rfc3986)) diff --git a/examples/docs/subdir/subdir.schema.md b/examples/docs/subdir/subdir.schema.md index 259b69e53fb5d9e411a53a75c698c9c33e1fa4c0..1d9706d1b56058b9bebce815cbfe837f07be345e 100644 --- a/examples/docs/subdir/subdir.schema.md +++ b/examples/docs/subdir/subdir.schema.md @@ -26,6 +26,7 @@ A schema in a sub directory A unique identifier given to every addressable thing. `id` + * is optional * type: `string` * defined in this schema @@ -34,6 +35,7 @@ A unique identifier given to every addressable thing. `string` + * format: `uri` – Uniformous Resource Identifier (according to [RFC3986](http://tools.ietf.org/html/rfc3986)) diff --git a/spec/examples/abstract.schema.md b/spec/examples/abstract.schema.md index fdd7b672ec7e4aeebbbc85ce0a7747324c768210..1911188a7774bf095e195faf5c8989b48e229ec1 100644 --- a/spec/examples/abstract.schema.md +++ b/spec/examples/abstract.schema.md @@ -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. `bar` + * is optional * type: `string` * defined in this schema @@ -42,11 +43,13 @@ A unique identifier given to every addressable thing. + ## foo A unique identifier given to every addressable thing. `foo` + * is optional * type: `string` * defined in this schema @@ -61,11 +64,13 @@ A unique identifier given to every addressable thing. + ## nonfoo This is not foo. `nonfoo` + * is optional * type: `const` * defined in this schema diff --git a/spec/examples/arrays.schema.md b/spec/examples/arrays.schema.md index 74c7371d70d4b971396de79f67f032f5856ca1ce..a20bb6563b596a747bdaa3393ba2001ec6008acb 100644 --- a/spec/examples/arrays.schema.md +++ b/spec/examples/arrays.schema.md @@ -34,6 +34,7 @@ This is an example schema with examples for multiple array types and their const This is an array `boollist` + * is optional * type: `boolean[]` * at least `1` items in the array @@ -58,6 +59,7 @@ All items must be of the type: This is an array of coordinates in three-dimensional space. `coordinatelist` + * is optional * type: `number[][]` (nested array) * no more than `10` items in the array @@ -72,6 +74,7 @@ Nested array type: `number[]` All items must be of the type: `number` + * minimum value: `0` * maximum value: `10` @@ -92,6 +95,7 @@ A coordinate, specified by `x`, `y`, and `z` values This is an array `intlist` + * is optional * type: `integer[]` * between `1` and `10` items in the array @@ -113,14 +117,15 @@ All items must be of the type: + ## list This is an array `list` + * is optional * type: `string[]` - * defined in this schema ### list Type @@ -139,14 +144,15 @@ All items must be of the type: + ## listlist This is an array of arrays `listlist` + * is optional * type: `array[]` (nested array) - * defined in this schema ### listlist Type @@ -168,6 +174,7 @@ Nested array type: `array` This is an array `numlist` + * is optional * type: `number[]` * no more than `10` items in the array @@ -180,6 +187,7 @@ Array type: `number[]` All items must be of the type: `number` + * minimum value: `10` @@ -194,9 +202,9 @@ All items must be of the type: An array of simple objects `objectlist` + * is optional * type: `object[]` - * defined in this schema ### objectlist Type @@ -220,6 +228,7 @@ All items must be of the type: The a property `a` + * is **required** * type: `string` @@ -235,11 +244,13 @@ The a property + #### b The b property `b` + * is optional * type: `integer` @@ -261,14 +272,15 @@ The b property + ## stringlistlist This is an array of arrays of strings `stringlistlist` + * is optional * type: `string[][]` (nested array) - * defined in this schema ### stringlistlist Type @@ -290,3 +302,4 @@ All items must be of the type: + diff --git a/spec/examples/complex.schema.md b/spec/examples/complex.schema.md index c813c30a2b0237ed74f602ea640e171cff2bdac2..680809525d9515597f9cce32a66c296be72c35a6 100644 --- a/spec/examples/complex.schema.md +++ b/spec/examples/complex.schema.md @@ -40,6 +40,7 @@ This is an example schema that uses types defined in other schemas. Number in a range `and` + * is optional * type: complex * defined in this schema @@ -54,6 +55,7 @@ Number in a range `number` + * maximum value: `10` @@ -61,6 +63,7 @@ Number in a range `number` + * minimum value: `0` @@ -74,6 +77,7 @@ Number in a range String or number… `or` + * is optional * type: complex * defined in this schema @@ -91,10 +95,12 @@ String or number… + #### Option 2 `number` + * minimum value: `0` @@ -107,6 +113,7 @@ String or number… `refabstract` + * is **required** * type: `object` * defined in this schema @@ -129,6 +136,7 @@ String or number… A unique identifier given to every addressable thing. `foo` + * is optional * type: `string` @@ -144,11 +152,13 @@ A unique identifier given to every addressable thing. + #### nonfoo This is not foo. `nonfoo` + * is optional * type: `const` @@ -171,9 +181,9 @@ false `reflist` + * is optional * type: Simple - * defined in this schema ### reflist Type @@ -195,6 +205,7 @@ All items must be of the type: `refnamed` + * is optional * type: Simple * defined in this schema @@ -213,6 +224,7 @@ All items must be of the type: Exclusive choice. `xor` + * is optional * type: complex * defined in this schema @@ -227,6 +239,7 @@ Exclusive choice. `number` + * maximum value: `0` @@ -234,6 +247,7 @@ Exclusive choice. `number` + * minimum value: `10` @@ -247,6 +261,7 @@ Applies to all properties that match the regular expression `int.*` `int.*` + * is a property pattern * type: `integer` * defined in this schema @@ -261,11 +276,13 @@ Applies to all properties that match the regular expression `int.*` + ## Pattern: `str.*` Applies to all properties that match the regular expression `str.*` `str.*` + * is a property pattern * type: `string` * defined in this schema @@ -279,3 +296,4 @@ Applies to all properties that match the regular expression `str.*` + diff --git a/spec/examples/constants.schema.md b/spec/examples/constants.schema.md index cf4c3870e8783b26e91e350fb9c988f41215df13..03c8088286ea94d244804cf23398edad2f236d61 100644 --- a/spec/examples/constants.schema.md +++ b/spec/examples/constants.schema.md @@ -27,6 +27,7 @@ This is an example schema with examples for properties with constant values A simple string, without strong constraints. `hello` + * is **required** * type: `const` * defined in this schema diff --git a/spec/examples/custom.schema.md b/spec/examples/custom.schema.md index d2971e16b2c3fd8449f0b75bc80eac5c4229d552..17e616c46d9b55e2ad26e345ead1fd24b941c667 100644 --- a/spec/examples/custom.schema.md +++ b/spec/examples/custom.schema.md @@ -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. `bar` + * is optional * type: `string` * defined in this schema @@ -42,11 +43,13 @@ A unique identifier given to every addressable thing. + ## foo A unique identifier given to every addressable thing. `foo` + * is optional * type: `string` * defined in this schema @@ -60,3 +63,4 @@ A unique identifier given to every addressable thing. + diff --git a/spec/examples/deepextending.schema.md b/spec/examples/deepextending.schema.md index 4ec03594460cfb8dfb90cb8bd45ee3848014cb05..cdde5af1ce3441f3ca45a3e613db2d5f08421815 100644 --- a/spec/examples/deepextending.schema.md +++ b/spec/examples/deepextending.schema.md @@ -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" `@id` + * is optional * type: `string` * defined in [Definitions](definitions.schema.md#id) @@ -47,6 +48,7 @@ An `id` with an `@` in front of it. The `@` stands for "dot com" `string` + * 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" A horse walks into it. `bar` + * is optional * type: `string` * defined in [Extensible](extensible.schema.md#bar) @@ -72,6 +75,7 @@ A horse walks into it. + ### bar Examples ```json @@ -90,6 +94,7 @@ A horse walks into it. This property has a unique name to demonstrate it's uniqueness. `baz` + * is optional * type: `string` * defined in [Extending](extending.schema.md#baz) @@ -103,6 +108,7 @@ This property has a unique name to demonstrate it's uniqueness. + ### baz Example ```json @@ -115,6 +121,7 @@ This property has a unique name to demonstrate it's uniqueness. A unique identifier given to every addressable thing. `hey` + * is optional * type: `string` * defined in this schema @@ -129,11 +136,13 @@ A unique identifier given to every addressable thing. + ## id A unique identifier given to every addressable thing. `id` + * is optional * type: `string` * defined in [Definitions](definitions.schema.md#id-1) @@ -142,6 +151,7 @@ A unique identifier given to every addressable thing. `string` + * 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. An about ids. It is meta. If you are confused, send an email to the address specified in this property value. `meta:id` + * is optional * type: `string` * 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 `string` + * format: `email` – email address (according to [RFC 5322, section 3.4.1](https://tools.ietf.org/html/rfc5322)) diff --git a/spec/examples/definitions.schema.md b/spec/examples/definitions.schema.md index 0054a2ea8b065dffdc76a0e18390be3a6b7b1b7c..4f9240e146a348423493dffd81c7f27ea45d3810 100644 --- a/spec/examples/definitions.schema.md +++ b/spec/examples/definitions.schema.md @@ -46,6 +46,7 @@ aks. An `id` with an `@` in front of it. The `@` stands for "dot com" `@id` + * is optional * type: `string` * defined in this schema @@ -54,6 +55,7 @@ An `id` with an `@` in front of it. The `@` stands for "dot com" `string` + * 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" A unique identifier given to every addressable thing. `id` + * is **required** * type: `string` * defined in this schema @@ -74,6 +77,7 @@ A unique identifier given to every addressable thing. `string` + * 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. An about ids. It is meta. If you are confused, send an email to the address specified in this property value. `meta:id` + * is optional * type: `string` * 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 `string` + * format: `email` – email address (according to [RFC 5322, section 3.4.1](https://tools.ietf.org/html/rfc5322)) diff --git a/spec/examples/enums.schema.md b/spec/examples/enums.schema.md index 93d471654eadb7897b966a61b9482d20f0aadde0..57d97014ac5c57e903e53a4a537c7fa4cda8d91a 100644 --- a/spec/examples/enums.schema.md +++ b/spec/examples/enums.schema.md @@ -28,6 +28,7 @@ This is an example schema with examples for properties with enum values A simple string. Pick a value. `hello` + * is **required** * type: `enum` * defined in this schema @@ -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 `nested` + * is optional * type: `object` * defined in this schema @@ -70,6 +72,7 @@ This is an example schema with examples for properties of nested objects with en A simple string. Pick a value. `test` + * is optional * type: `enum` diff --git a/spec/examples/example.schema.md b/spec/examples/example.schema.md index 39a7d67437492bdde4b4f4185e39440f20a2d0fd..90979823352fc7ecbd2153b2edbaf4d8b9e07939 100644 --- a/spec/examples/example.schema.md +++ b/spec/examples/example.schema.md @@ -36,6 +36,7 @@ This is an example schema with examples. Too many examples? There can never be t A simple string. `bar` + * is optional * type: `string` * defined in this schema @@ -49,6 +50,7 @@ A simple string. + ### bar Examples ```json @@ -66,6 +68,7 @@ A simple string. A simple string. `foo` + * is optional * type: `string` * defined in this schema @@ -79,6 +82,7 @@ A simple string. + ### foo Example ```json diff --git a/spec/examples/examples.schema.md b/spec/examples/examples.schema.md index 5d4aa2ca7ebfed62be546e3be03db4211728114f..c3ec772d10763a576196936519abc09b994660de 100644 --- a/spec/examples/examples.schema.md +++ b/spec/examples/examples.schema.md @@ -45,6 +45,7 @@ This is an example schema with *multiple* examples. Too many examples? There can A simple string. `bar` + * is **required** * type: `string` * defined in this schema @@ -58,6 +59,7 @@ A simple string. + ### bar Examples ```json @@ -75,6 +77,7 @@ A simple string. A simple string. `foo` + * is optional * type: `string` * defined in this schema @@ -88,6 +91,7 @@ A simple string. + ### foo Example ```json diff --git a/spec/examples/extending.schema.md b/spec/examples/extending.schema.md index bc55d8728ab2bd21963f8cfe51e009bb500fb1d3..90ee58cd98320177afc2b760a76dc5030fba5fbb 100644 --- a/spec/examples/extending.schema.md +++ b/spec/examples/extending.schema.md @@ -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" `@id` + * is optional * type: `string` * defined in [Definitions](definitions.schema.md#id) @@ -45,6 +46,7 @@ An `id` with an `@` in front of it. The `@` stands for "dot com" `string` + * 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" A horse walks into it. `bar` + * is optional * type: `string` * defined in [Extensible](extensible.schema.md#bar) @@ -70,6 +73,7 @@ A horse walks into it. + ### bar Examples ```json @@ -88,6 +92,7 @@ A horse walks into it. This property has a unique name to demonstrate it's uniqueness. `baz` + * is optional * type: `string` * defined in this schema @@ -101,6 +106,7 @@ This property has a unique name to demonstrate it's uniqueness. + ### baz Example ```json @@ -113,6 +119,7 @@ This property has a unique name to demonstrate it's uniqueness. A unique identifier given to every addressable thing. `id` + * is optional * type: `string` * defined in [Definitions](definitions.schema.md#id-1) @@ -121,6 +128,7 @@ A unique identifier given to every addressable thing. `string` + * 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. An about ids. It is meta. If you are confused, send an email to the address specified in this property value. `meta:id` + * is optional * type: `string` * 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 `string` + * format: `email` – email address (according to [RFC 5322, section 3.4.1](https://tools.ietf.org/html/rfc5322)) diff --git a/spec/examples/extensible.schema.md b/spec/examples/extensible.schema.md index edf1e5c40b6a066377bf253109734ebb4969d33d..e95a7e374b866e8868b080306fcac5faf5d0d4c5 100644 --- a/spec/examples/extensible.schema.md +++ b/spec/examples/extensible.schema.md @@ -27,6 +27,7 @@ This is an extensible schema. It has `definitions`, that can be used in other sc A horse walks into it. `bar` + * is optional * type: `string` * defined in this schema @@ -40,6 +41,7 @@ A horse walks into it. + ### bar Examples ```json @@ -57,6 +59,7 @@ A horse walks into it. A unique identifier given to every addressable thing. `foo` + * is optional * type: `string` * defined in this schema @@ -70,6 +73,7 @@ A unique identifier given to every addressable thing. + ### foo Example ```json diff --git a/spec/examples/identifiable.schema.md b/spec/examples/identifiable.schema.md index d0dc69e4a00ffed1196ddf4ca847191b8427e317..f081f5c4cfe8e32c4259e32608c0e5a4cdad2135 100644 --- a/spec/examples/identifiable.schema.md +++ b/spec/examples/identifiable.schema.md @@ -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. `@id` + * is optional * type: `string` * defined in this schema @@ -35,6 +36,7 @@ A unique identifier given to every addressable thing. `string` + * format: `uri` – Uniformous Resource Identifier (according to [RFC3986](http://tools.ietf.org/html/rfc3986)) diff --git a/spec/examples/simple.schema.md b/spec/examples/simple.schema.md index b801c02f404115e1ccfe9d8e24186df46e6ce035..1278f91e010b0c08d2eeee26ce3d00e22474e53a 100644 --- a/spec/examples/simple.schema.md +++ b/spec/examples/simple.schema.md @@ -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. `id` + * is optional * type: `string` * defined in this schema @@ -35,6 +36,7 @@ A unique identifier given to every addressable thing. `string` + * format: `uri` – Uniformous Resource Identifier (according to [RFC3986](http://tools.ietf.org/html/rfc3986)) diff --git a/spec/examples/simpletypes.schema.md b/spec/examples/simpletypes.schema.md index b030c5ad4cb58776086a4d92a35b764a00199f4e..fb4c47d4b07a493e9cb56f1ac7b89648c9753aa2 100644 --- a/spec/examples/simpletypes.schema.md +++ b/spec/examples/simpletypes.schema.md @@ -43,6 +43,7 @@ This is an example schema with examples for multiple types and their constraints Guess what number is valid `integer_threes` + * is optional * type: `integer` * defined in this schema @@ -51,6 +52,7 @@ Guess what number is valid `integer` + * minimum value: `2` * maximum value: `4` * must be a multiple of `3` @@ -64,6 +66,7 @@ Guess what number is valid Just a whole number. I don't like fractions. Don't get too small `interger_constrained` + * is optional * type: `integer` * defined in this schema @@ -72,6 +75,7 @@ Just a whole number. I don't like fractions. Don't get too small `integer` + * minimum value: `10` @@ -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. `interger_unconstrained` + * is optional * type: `integer` * defined in this schema @@ -98,11 +103,13 @@ Just a whole number. I don't like fractions. + ## number_constrained Just a number. Don't get too big. `number_constrained` + * is optional * type: `number` * defined in this schema @@ -111,6 +118,7 @@ Just a number. Don't get too big. `number` + * value must not be greater or equal than: `10` @@ -122,6 +130,7 @@ Just a number. Don't get too big. Just a number `number_unconstrained` + * is optional * type: `number` * defined in this schema @@ -136,11 +145,13 @@ Just a number + ## string_date A date-like string. `string_date` + * is optional * type: `string` * defined in this schema @@ -149,6 +160,7 @@ A date-like string. `string` + * 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. An email-like string. `string_email` + * is optional * type: `string` * defined in this schema @@ -169,6 +182,7 @@ An email-like string. `string` + * 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. A hostname-like string. `string_hostname` + * is optional * type: `string` * defined in this schema @@ -189,6 +204,7 @@ A hostname-like string. `string` + * 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. An IPv4-like string. `string_ipv4` + * is optional * type: `string` * defined in this schema @@ -209,6 +226,7 @@ An IPv4-like string. `string` + * 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. An IPv6-like string. `string_ipv6` + * is optional * type: `string` * defined in this schema @@ -229,6 +248,7 @@ An IPv6-like string. `string` + * 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. A string with minumum and maximum length `string_length` + * is optional * type: `string` * defined in this schema @@ -249,6 +270,7 @@ A string with minumum and maximum length `string` + * minimum length: 3 characters * maximum length: 3 characters @@ -271,6 +293,7 @@ A string with minumum and maximum length A string following a regular expression `string_pattern` + * is optional * type: `string` * defined in this schema @@ -281,6 +304,7 @@ A string following a regular expression `string` + All instances must conform to this regular expression ```regex ^ba.$ @@ -328,6 +352,7 @@ All instances must conform to this regular expression A string following a regular expression `string_pattern_noexample` + * is optional * type: `string` * defined in this schema @@ -338,6 +363,7 @@ A string following a regular expression `string` + All instances must conform to this regular expression (test examples [here](https://regexr.com/?expression=%5Eba.%24)): ```regex @@ -354,6 +380,7 @@ All instances must conform to this regular expression A string following a regular expression `string_pattern_singleexample` + * is optional * type: `string` * defined in this schema @@ -364,6 +391,7 @@ A string following a regular expression `string` + All instances must conform to this regular expression ```regex ^ba.$ @@ -386,6 +414,7 @@ All instances must conform to this regular expression A simple string, without any constraints. `string_unconstrained` + * is optional * type: `string` * defined in this schema @@ -399,6 +428,7 @@ A simple string, without any constraints. + ### string_unconstrained Example ```json @@ -411,6 +441,7 @@ A simple string, without any constraints. A URI. `string_uri` + * is optional * type: `string` * defined in this schema @@ -419,6 +450,7 @@ A URI. `string` + * format: `uri` – Uniformous Resource Identifier (according to [RFC3986](http://tools.ietf.org/html/rfc3986)) @@ -430,6 +462,7 @@ A URI. `yesno` + * is **required** * type: `boolean` * defined in this schema diff --git a/spec/examples/stabilizing.schema.md b/spec/examples/stabilizing.schema.md index cc1a08297d82e3ca6e383a8fcb6900b60d2f4403..21c3998e97c8e6f2c7da4af22e6cacc326498655 100644 --- a/spec/examples/stabilizing.schema.md +++ b/spec/examples/stabilizing.schema.md @@ -27,6 +27,7 @@ This is a schema which is currently in the `stabilizing` status. A unique identifier given to every addressable thing. `id` + * is optional * type: `string` * defined in this schema @@ -35,6 +36,7 @@ A unique identifier given to every addressable thing. `string` + * format: `uri` – Uniformous Resource Identifier (according to [RFC3986](http://tools.ietf.org/html/rfc3986))