From 965907f8f5ff18e09cbf8cb9e58e5ed510ba0e7f Mon Sep 17 00:00:00 2001 From: Lars Trieloff <trieloff@adobe.com> Date: Mon, 18 Mar 2019 11:33:11 +0000 Subject: [PATCH] Fix spaces --- examples/docs/arrays.schema.md | 3 +++ examples/docs/deepextending.schema.md | 5 +++++ examples/docs/definitions.schema.md | 3 +++ examples/docs/example.schema.md | 2 ++ examples/docs/examples.schema.md | 2 ++ examples/docs/extending.schema.md | 5 +++++ examples/docs/extensible.schema.md | 2 ++ examples/docs/identifiable.schema.md | 1 + examples/docs/join.schema.md | 2 ++ examples/docs/pattern.schema.md | 1 + examples/docs/simple.schema.md | 1 + examples/docs/simpletypes.schema.md | 10 ++++++++++ examples/docs/stabilizing.schema.md | 1 + examples/docs/subdir/subdir.schema.md | 1 + spec/examples/arrays.schema.md | 5 +---- templates/md/string-type.ejs | 1 + 16 files changed, 41 insertions(+), 4 deletions(-) diff --git a/examples/docs/arrays.schema.md b/examples/docs/arrays.schema.md index 9e88e32..99b0434 100644 --- a/examples/docs/arrays.schema.md +++ b/examples/docs/arrays.schema.md @@ -80,6 +80,7 @@ A simple string. + ##### foo Example ```json @@ -119,6 +120,7 @@ A simple string. + ##### bar Example ```json @@ -251,6 +253,7 @@ All items must be of the type: + ## listlist This is an array of arrays diff --git a/examples/docs/deepextending.schema.md b/examples/docs/deepextending.schema.md index ea0a7fc..2a2faf1 100644 --- a/examples/docs/deepextending.schema.md +++ b/examples/docs/deepextending.schema.md @@ -48,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)) @@ -74,6 +75,7 @@ A horse walks into it. + ### bar Examples ```json @@ -106,6 +108,7 @@ This property has a unique name to demonstrate it's uniqueness. + ### baz Example ```json @@ -148,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)) @@ -169,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 f86f184..556bf88 100644 --- a/examples/docs/definitions.schema.md +++ b/examples/docs/definitions.schema.md @@ -55,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)) @@ -76,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)) @@ -97,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/example.schema.md b/examples/docs/example.schema.md index fea43b8..d6ea6ca 100644 --- a/examples/docs/example.schema.md +++ b/examples/docs/example.schema.md @@ -50,6 +50,7 @@ A simple string. + ### bar Examples ```json @@ -81,6 +82,7 @@ A simple string. + ### foo Example ```json diff --git a/examples/docs/examples.schema.md b/examples/docs/examples.schema.md index 65256e9..8de2b63 100644 --- a/examples/docs/examples.schema.md +++ b/examples/docs/examples.schema.md @@ -59,6 +59,7 @@ A simple string. + ### bar Examples ```json @@ -90,6 +91,7 @@ A simple string. + ### foo Example ```json diff --git a/examples/docs/extending.schema.md b/examples/docs/extending.schema.md index 7558472..ebfb292 100644 --- a/examples/docs/extending.schema.md +++ b/examples/docs/extending.schema.md @@ -46,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)) @@ -72,6 +73,7 @@ A horse walks into it. + ### bar Examples ```json @@ -104,6 +106,7 @@ This property has a unique name to demonstrate it's uniqueness. + ### baz Example ```json @@ -125,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)) @@ -146,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 3474ecd..e95a7e3 100644 --- a/examples/docs/extensible.schema.md +++ b/examples/docs/extensible.schema.md @@ -41,6 +41,7 @@ A horse walks into it. + ### bar Examples ```json @@ -72,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 f0f03e4..d9e6011 100644 --- a/examples/docs/identifiable.schema.md +++ b/examples/docs/identifiable.schema.md @@ -36,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/join.schema.md b/examples/docs/join.schema.md index d901aa9..6435243 100644 --- a/examples/docs/join.schema.md +++ b/examples/docs/join.schema.md @@ -49,6 +49,7 @@ A simple string. + ##### foo Example ```json @@ -88,6 +89,7 @@ A simple string. + ##### bar Example ```json diff --git a/examples/docs/pattern.schema.md b/examples/docs/pattern.schema.md index f714194..ca0a57e 100644 --- a/examples/docs/pattern.schema.md +++ b/examples/docs/pattern.schema.md @@ -36,6 +36,7 @@ A simple string. + ### [0-9] Example ```json diff --git a/examples/docs/simple.schema.md b/examples/docs/simple.schema.md index aef493d..646f5b8 100644 --- a/examples/docs/simple.schema.md +++ b/examples/docs/simple.schema.md @@ -36,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 164b9ca..351cddc 100644 --- a/examples/docs/simpletypes.schema.md +++ b/examples/docs/simpletypes.schema.md @@ -160,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)) @@ -181,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)) @@ -202,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)) @@ -223,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)) @@ -244,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)) @@ -299,6 +304,7 @@ A string following a regular expression `string` + All instances must conform to this regular expression ```regex ^ba.$ @@ -357,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 @@ -384,6 +391,7 @@ A string following a regular expression `string` + All instances must conform to this regular expression ```regex ^ba.$ @@ -420,6 +428,7 @@ A simple string, without any constraints. + ### string_unconstrained Example ```json @@ -441,6 +450,7 @@ A URI. `string` + * format: `uri` – Uniformous Resource Identifier (according to [RFC3986](http://tools.ietf.org/html/rfc3986)) diff --git a/examples/docs/stabilizing.schema.md b/examples/docs/stabilizing.schema.md index 6c2997f..a127816 100644 --- a/examples/docs/stabilizing.schema.md +++ b/examples/docs/stabilizing.schema.md @@ -36,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 b3c0228..b5b46a7 100644 --- a/examples/docs/subdir/subdir.schema.md +++ b/examples/docs/subdir/subdir.schema.md @@ -45,6 +45,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/arrays.schema.md b/spec/examples/arrays.schema.md index 0f35ce6..9e88e32 100644 --- a/spec/examples/arrays.schema.md +++ b/spec/examples/arrays.schema.md @@ -19,7 +19,7 @@ This is an example schema with examples for multiple array types and their const | Property | Type | Required | Nullable | Defined by | |----------|------|----------|----------|------------| -| [JoinTypelist](#jointypelist) | `array` | Optional | No | Arrays (this schema) | +| [JoinTypelist](#jointypelist) | `array` | Optional | No | Arrays (this schema) | | [boollist](#boollist) | `boolean[]` | Optional | No | Arrays (this schema) | | [coordinatelist](#coordinatelist) | `number[][]` | Optional | No | Arrays (this schema) | | [intlist](#intlist) | `integer[]` | Optional | No | Arrays (this schema) | @@ -80,7 +80,6 @@ A simple string. - ##### foo Example ```json @@ -120,7 +119,6 @@ A simple string. - ##### bar Example ```json @@ -253,7 +251,6 @@ All items must be of the type: - ## listlist This is an array of arrays diff --git a/templates/md/string-type.ejs b/templates/md/string-type.ejs index a59ecbe..6edcbdf 100644 --- a/templates/md/string-type.ejs +++ b/templates/md/string-type.ejs @@ -7,6 +7,7 @@ `string`<%=schema.nullable ? ", nullable" : "" %> + <% if (schema.format==="uri") { %>* format: `uri` – Uniformous Resource Identifier (according to [RFC3986](http://tools.ietf.org/html/rfc3986))<% } else if (schema.format==="date-time") { %>* format: `date-time` – date and time (according to [RFC 3339, section 5.6](http://tools.ietf.org/html/rfc3339))<% } -- GitLab