From 0634309458035f6521d3a956ac158f80ee65199a Mon Sep 17 00:00:00 2001 From: Claymore1337 <31853210+Claymore1337@users.noreply.github.com> Date: Mon, 26 Aug 2019 16:17:43 +0200 Subject: [PATCH] feat: allow display of custom attributes in the property description fixes #151 --- README.md | 6 +- cli.js | 2 + examples/docs/abstract.schema.md | 6 + examples/docs/arrays.schema.md | 26 ++++ examples/docs/complex.schema.md | 30 ++++ examples/docs/constants.schema.md | 2 + examples/docs/custom.schema.md | 4 + examples/docs/deepextending.schema.md | 12 ++ examples/docs/definitions.schema.md | 6 + examples/docs/enums.schema.md | 6 + examples/docs/example.schema.md | 4 + examples/docs/examples.schema.md | 4 + examples/docs/extending.schema.md | 10 ++ examples/docs/extensible.schema.md | 4 + examples/docs/identifiable.schema.md | 2 + examples/docs/join.schema.md | 4 + examples/docs/nestedobj.schema.md | 6 + examples/docs/pattern.schema.md | 2 + examples/docs/simple.schema.md | 2 + examples/docs/simpletypes.schema.md | 34 +++++ examples/docs/stabilizing.schema.md | 2 + examples/docs/subdir/subdir.schema.md | 2 + examples/docs/typearrays.schema.md | 8 ++ .../generated-schemas/abstract.schema.json | 12 +- examples/generated-schemas/arrays.schema.json | 58 ++++++-- .../generated-schemas/complex.schema.json | 54 +++++-- .../generated-schemas/constants.schema.json | 4 +- examples/generated-schemas/custom.schema.json | 8 +- .../deepextending.schema.json | 4 +- .../generated-schemas/definitions.schema.json | 12 +- examples/generated-schemas/enums.schema.json | 12 +- .../generated-schemas/example.schema.json | 8 +- .../generated-schemas/examples.schema.json | 8 +- .../generated-schemas/extending.schema.json | 4 +- .../generated-schemas/extensible.schema.json | 8 +- .../identifiable.schema.json | 4 +- examples/generated-schemas/join.schema.json | 8 +- .../generated-schemas/nestedobj.schema.json | 12 +- .../generated-schemas/pattern.schema.json | 4 +- examples/generated-schemas/simple.schema.json | 4 +- .../generated-schemas/simpletypes.schema.json | 68 ++++++--- .../generated-schemas/stabilizing.schema.json | 4 +- .../subdir/subdir.schema.json | 4 +- .../generated-schemas/typearrays.schema.json | 16 ++- examples/schemas/abstract.schema.json | 12 +- examples/schemas/arrays.schema.json | 58 ++++++-- examples/schemas/complex.schema.json | 54 +++++-- examples/schemas/constants.schema.json | 4 +- examples/schemas/custom.schema.json | 8 +- examples/schemas/deepextending.schema.json | 4 +- examples/schemas/definitions.schema.json | 12 +- examples/schemas/enums.schema.json | 12 +- examples/schemas/example.schema.json | 8 +- examples/schemas/examples.schema.json | 8 +- examples/schemas/extending.schema.json | 4 +- examples/schemas/extensible.schema.json | 8 +- examples/schemas/identifiable.schema.json | 4 +- examples/schemas/join.schema.json | 8 +- examples/schemas/nestedobj.schema.json | 12 +- examples/schemas/pattern.schema.json | 4 +- examples/schemas/simple.schema.json | 4 +- examples/schemas/simpletypes.schema.json | 68 ++++++--- examples/schemas/stabilizing.schema.json | 4 +- examples/schemas/subdir/subdir.schema.json | 4 +- examples/schemas/typearrays.schema.json | 16 ++- lib/markdownWriter.js | 14 +- package-lock.json | 132 +++++++++--------- package.json | 1 + spec/examples/abstract.schema.md | 6 + spec/examples/arrays.schema.md | 26 ++++ spec/examples/complex.schema.md | 30 ++++ spec/examples/constants.schema.md | 2 + spec/examples/custom.schema.md | 4 + spec/examples/deepextending.schema.md | 12 ++ spec/examples/definitions.schema.md | 6 + spec/examples/enums.schema.md | 6 + spec/examples/example.schema.md | 4 + spec/examples/examples.schema.md | 4 + spec/examples/extending.schema.md | 10 ++ spec/examples/extensible.schema.md | 4 + spec/examples/identifiable.schema.md | 2 + spec/examples/join.schema.md | 4 + spec/examples/nestedobj.schema.md | 6 + spec/examples/pattern.schema.md | 2 + spec/examples/simple.schema.md | 2 + spec/examples/simpletypes.schema.md | 34 +++++ spec/examples/stabilizing.schema.md | 2 + spec/examples/subdir/subdir.schema.md | 2 + spec/examples/typearrays.schema.md | 8 ++ spec/lib/integrationTest.spec.js | 1 + templates/md/array-type.ejs | 6 +- templates/md/join-type.ejs | 6 +- templates/md/nested-property.ejs | 9 +- templates/md/object-type.ejs | 3 +- templates/md/pattern-property.ejs | 7 +- templates/md/property.ejs | 8 +- 96 files changed, 933 insertions(+), 246 deletions(-) diff --git a/README.md b/README.md index cacaf665..18526beb 100644 --- a/README.md +++ b/README.md @@ -52,8 +52,12 @@ Each text which is not provided by the JSON Schema is loaded from an i18n file. $ jsonschema2md -d examples/schemas -o examples/docs -v 06 -i temp/myFiles ``` +## Display custom attributes in the property description +`jsonschema2md` displays only the attributes of an property which are defined by the JSON Schema standard. If you want to display additional attributes in the property description you could provide a comma separated list with your custom attributes. - +```bash +$ jsonschema2md -d examples/schemas -o examples/docs -p version,test +``` ## Disable header template In some cases you do not need a header because it does not provide any useful information. With the `--header` (or `-h`) parameter you can disable the inclusion of headers. diff --git a/cli.js b/cli.js index fcf8e774..d93e807e 100755 --- a/cli.js +++ b/cli.js @@ -60,6 +60,8 @@ const { argv } = Optimist }) .alias('i', 'i18n') .describe('i', 'path to a locales folder with an en.json file in it. This file will be used for all text parts in all templates') + .alias('p', 'properties') + .describe('p', 'A comma separated list with custom properties which should be also in the description of an element.') .alias('h', 'header') .describe('h', 'if the value is false the header will be skipped') .default('h', true); diff --git a/examples/docs/abstract.schema.md b/examples/docs/abstract.schema.md index 3edb5540..b00f7744 100644 --- a/examples/docs/abstract.schema.md +++ b/examples/docs/abstract.schema.md @@ -32,6 +32,8 @@ A unique identifier given to every addressable thing. - is optional - type: `string` - defined in this schema +- version: 1.0.0 +- testProperty: test ### bar Type @@ -46,6 +48,8 @@ A unique identifier given to every addressable thing. - is optional - type: `string` - defined in this schema +- version: 1.0.0 +- testProperty: test ### foo Type @@ -60,6 +64,8 @@ This is not foo. - is optional - type: `const` - defined in this schema +- version: 1.0.0 +- testProperty: test The value of this property **must** be equal to: diff --git a/examples/docs/arrays.schema.md b/examples/docs/arrays.schema.md index 1e71ec8c..8abcd919 100644 --- a/examples/docs/arrays.schema.md +++ b/examples/docs/arrays.schema.md @@ -39,6 +39,8 @@ An array of simple objects - is optional - type: `array` - defined in this schema +- version: 1.0.0 +- testProperty: test ### JoinTypelist Type @@ -64,6 +66,8 @@ A simple string. - is optional - type: `string` +- version: 1.0.0 +- testProperty: test ##### foo Type @@ -91,6 +95,8 @@ A simple string. - is optional - type: `string` +- version: 1.0.0 +- testProperty: test ##### bar Type @@ -112,6 +118,8 @@ This is an array - type: `boolean[]` - at least `1` items in the array - defined in this schema +- version: 1.0.0 +- testProperty: test ### boollist Type @@ -129,6 +137,8 @@ This is an array of coordinates in three-dimensional space. - type: `number[][]` (nested array) - no more than `10` items in the array - defined in this schema +- version: 1.0.0 +- testProperty: test ### coordinatelist Type @@ -151,6 +161,8 @@ This is an array - type: `integer[]` - between `1` and `10` items in the array - defined in this schema +- version: 1.0.0 +- testProperty: test ### intlist Type @@ -167,6 +179,8 @@ This is an array - is optional - type: `string[]` - defined in this schema +- version: 1.0.0 +- testProperty: test ### list Type @@ -183,6 +197,8 @@ This is an array of arrays - is optional - type: `array[]` (nested array) - defined in this schema +- version: 1.0.0 +- testProperty: test ### listlist Type @@ -198,6 +214,8 @@ This is an array - type: `number[]` - no more than `10` items in the array - defined in this schema +- version: 1.0.0 +- testProperty: test ### numlist Type @@ -216,6 +234,8 @@ An array of simple objects - is optional - type: `object[]` - defined in this schema +- version: 1.0.0 +- testProperty: test ### objectlist Type @@ -236,6 +256,8 @@ The a property - is **required** - type: `string` +- version: 1.0.0 +- testProperty: test ##### a Type @@ -249,6 +271,8 @@ The b property - is optional - type: `integer` +- version: 1.0.0 +- testProperty: test ##### b Type @@ -263,6 +287,8 @@ This is an array of arrays of strings - is optional - type: `string[][]` (nested array) - defined in this schema +- version: 1.0.0 +- testProperty: test ### stringlistlist Type diff --git a/examples/docs/complex.schema.md b/examples/docs/complex.schema.md index 0c694a00..2edf11c3 100644 --- a/examples/docs/complex.schema.md +++ b/examples/docs/complex.schema.md @@ -46,6 +46,8 @@ Number in a range - is optional - type: complex - defined in this schema +- version: 1.0.0 +- testProperty: test ### and Type @@ -72,6 +74,8 @@ String or number… - is optional - type: complex - defined in this schema +- version: 1.0.0 +- testProperty: test ### or Type @@ -94,6 +98,8 @@ String or number… - is **required** - type: `object` - defined in this schema +- version: 1.0.0 +- testProperty: test ### refabstract Type @@ -112,6 +118,8 @@ A unique identifier given to every addressable thing. - is optional - type: `string` +- version: 1.0.0 +- testProperty: test ##### foo Type @@ -125,6 +133,8 @@ This is not foo. - is optional - type: `const` +- version: 1.0.0 +- testProperty: test The value of this property **must** be equal to: @@ -139,6 +149,8 @@ false - is optional - type: Simple - defined in this schema +- version: 1.0.0 +- testProperty: test ### reflist Type @@ -155,6 +167,8 @@ All items must be of the type: - is optional - type: Simple - defined in this schema +- version: 1.0.0 +- testProperty: test ### refnamed Type @@ -167,6 +181,8 @@ All items must be of the type: - is optional - type: `object` - defined in this schema +- version: 1.0.0 +- testProperty: test ### refnestedobj Type @@ -182,6 +198,8 @@ All items must be of the type: - is optional - type: `object` +- version: 1.0.0 +- testProperty: test ##### refobj Type @@ -197,6 +215,8 @@ All items must be of the type: - is optional - type: Simple +- version: 1.0.0 +- testProperty: test ##### foo Type @@ -209,6 +229,8 @@ All items must be of the type: - is optional - type: `object` - defined in this schema +- version: 1.0.0 +- testProperty: test ### refobj Type @@ -224,6 +246,8 @@ All items must be of the type: - is optional - type: Simple +- version: 1.0.0 +- testProperty: test ##### foo Type @@ -238,6 +262,8 @@ Exclusive choice. - is optional - type: complex - defined in this schema +- version: 1.0.0 +- testProperty: test ### xor Type @@ -264,6 +290,8 @@ Applies to all properties that match the regular expression `int.*` - is a property pattern - type: `integer` - defined in this schema +- version: 1.0.0 +- testProperty: test ### Pattern int.\* Type @@ -278,6 +306,8 @@ Applies to all properties that match the regular expression `str.*` - is a property pattern - type: `string` - defined in this schema +- version: 1.0.0 +- testProperty: test ### Pattern str.\* Type diff --git a/examples/docs/constants.schema.md b/examples/docs/constants.schema.md index d7cc1f38..3a3a3949 100644 --- a/examples/docs/constants.schema.md +++ b/examples/docs/constants.schema.md @@ -31,6 +31,8 @@ A simple string, without strong constraints. - is **required** - type: `const` - defined in this schema +- version: 1.0.0 +- testProperty: test The value of this property **must** be equal to: diff --git a/examples/docs/custom.schema.md b/examples/docs/custom.schema.md index 7ad397bf..9e2f19aa 100644 --- a/examples/docs/custom.schema.md +++ b/examples/docs/custom.schema.md @@ -33,6 +33,8 @@ A unique identifier given to every addressable thing. - is optional - type: `string` - defined in this schema +- version: 1.0.0 +- testProperty: test ### bar Type @@ -47,6 +49,8 @@ A unique identifier given to every addressable thing. - is optional - type: `string` - defined in this schema +- version: 1.0.0 +- testProperty: test ### foo Type diff --git a/examples/docs/deepextending.schema.md b/examples/docs/deepextending.schema.md index 4476f0f5..6d61a057 100644 --- a/examples/docs/deepextending.schema.md +++ b/examples/docs/deepextending.schema.md @@ -43,6 +43,8 @@ An `id` with an `@` in front of it. The `@` stands for "dot com" - is optional - type: `string` - defined in [Definitions](definitions.schema.md#id) +- version: 1.0.0 +- testProperty: test ### @id Type @@ -59,6 +61,8 @@ A horse walks into it. - is optional - type: `string` - defined in [Extensible](extensible.schema.md#bar) +- version: 1.0.0 +- testProperty: test ### bar Type @@ -85,6 +89,8 @@ This property has a unique name to demonstrate it's uniqueness. - is optional - type: `string` - defined in [Extending](extending.schema.md#baz) +- version: 1.0.0 +- testProperty: test ### baz Type @@ -105,6 +111,8 @@ A unique identifier given to every addressable thing. - is optional - type: `string` - defined in this schema +- version: 1.0.0 +- testProperty: test ### hey Type @@ -119,6 +127,8 @@ A unique identifier given to every addressable thing. - is optional - type: `string` - defined in [Definitions](definitions.schema.md#id-1) +- version: 1.0.0 +- testProperty: test ### id Type @@ -135,6 +145,8 @@ An about ids. It is meta. If you are confused, send an email to the address spec - is optional - type: `string` - defined in [Definitions](definitions.schema.md#metaid) +- version: 1.0.0 +- testProperty: test ### meta:id Type diff --git a/examples/docs/definitions.schema.md b/examples/docs/definitions.schema.md index e5925eba..8a6355a5 100644 --- a/examples/docs/definitions.schema.md +++ b/examples/docs/definitions.schema.md @@ -49,6 +49,8 @@ An `id` with an `@` in front of it. The `@` stands for "dot com" - is **required** - type: `string` - defined in this schema +- version: 1.0.0 +- testProperty: test ### @id Type @@ -65,6 +67,8 @@ A unique identifier given to every addressable thing. - is **required** - type: `string` - defined in this schema +- version: 1.0.0 +- testProperty: test ### id Type @@ -81,6 +85,8 @@ An about ids. It is meta. If you are confused, send an email to the address spec - is optional - type: `string` - defined in this schema +- version: 1.0.0 +- testProperty: test ### meta:id Type diff --git a/examples/docs/enums.schema.md b/examples/docs/enums.schema.md index cc0bd845..b10c8067 100644 --- a/examples/docs/enums.schema.md +++ b/examples/docs/enums.schema.md @@ -32,6 +32,8 @@ A simple string. Pick a value. - is **required** - type: `enum` - defined in this schema +- version: 1.0.0 +- testProperty: test The value of this property **must** be equal to one of the [known values below](#hello-known-values). @@ -53,6 +55,8 @@ This is an example schema with examples for properties of nested objects with en - is optional - type: `object` - defined in this schema +- version: 1.0.0 +- testProperty: test ### nested Type @@ -70,6 +74,8 @@ A simple string. Pick a value. - is optional - type: `enum` +- version: 1.0.0 +- testProperty: test The value of this property **must** be equal to one of the [known values below](#nested-known-values). diff --git a/examples/docs/example.schema.md b/examples/docs/example.schema.md index c48808d4..69bec026 100644 --- a/examples/docs/example.schema.md +++ b/examples/docs/example.schema.md @@ -41,6 +41,8 @@ A simple string. - is optional - type: `string` - defined in this schema +- version: 1.0.0 +- testProperty: test ### bar Type @@ -65,6 +67,8 @@ A simple string. - is optional - type: `string` - defined in this schema +- version: 1.0.0 +- testProperty: test ### foo Type diff --git a/examples/docs/examples.schema.md b/examples/docs/examples.schema.md index bda1820c..1a52bb87 100644 --- a/examples/docs/examples.schema.md +++ b/examples/docs/examples.schema.md @@ -48,6 +48,8 @@ A simple string. - is **required** - type: `string` - defined in this schema +- version: 1.0.0 +- testProperty: test ### bar Type @@ -72,6 +74,8 @@ A simple string. - is optional - type: `string` - defined in this schema +- version: 1.0.0 +- testProperty: test ### foo Type diff --git a/examples/docs/extending.schema.md b/examples/docs/extending.schema.md index 1e2d9c97..58add686 100644 --- a/examples/docs/extending.schema.md +++ b/examples/docs/extending.schema.md @@ -41,6 +41,8 @@ An `id` with an `@` in front of it. The `@` stands for "dot com" - is optional - type: `string` - defined in [Definitions](definitions.schema.md#id) +- version: 1.0.0 +- testProperty: test ### @id Type @@ -57,6 +59,8 @@ A horse walks into it. - is optional - type: `string` - defined in [Extensible](extensible.schema.md#bar) +- version: 1.0.0 +- testProperty: test ### bar Type @@ -83,6 +87,8 @@ This property has a unique name to demonstrate it's uniqueness. - is optional - type: `string` - defined in this schema +- version: 1.0.0 +- testProperty: test ### baz Type @@ -103,6 +109,8 @@ A unique identifier given to every addressable thing. - is optional - type: `string` - defined in [Definitions](definitions.schema.md#id-1) +- version: 1.0.0 +- testProperty: test ### id Type @@ -119,6 +127,8 @@ An about ids. It is meta. If you are confused, send an email to the address spec - is optional - type: `string` - defined in [Definitions](definitions.schema.md#metaid) +- version: 1.0.0 +- testProperty: test ### meta:id Type diff --git a/examples/docs/extensible.schema.md b/examples/docs/extensible.schema.md index 4f67832f..183638fa 100644 --- a/examples/docs/extensible.schema.md +++ b/examples/docs/extensible.schema.md @@ -31,6 +31,8 @@ A horse walks into it. - is optional - type: `string` - defined in this schema +- version: 1.0.0 +- testProperty: test ### bar Type @@ -55,6 +57,8 @@ A unique identifier given to every addressable thing. - is optional - type: `string` - defined in this schema +- version: 1.0.0 +- testProperty: test ### foo Type diff --git a/examples/docs/identifiable.schema.md b/examples/docs/identifiable.schema.md index 86936b1c..81b4636b 100644 --- a/examples/docs/identifiable.schema.md +++ b/examples/docs/identifiable.schema.md @@ -31,6 +31,8 @@ A unique identifier given to every addressable thing. - is optional - type: `string` - defined in this schema +- version: 1.0.0 +- testProperty: test ### @id Type diff --git a/examples/docs/join.schema.md b/examples/docs/join.schema.md index 390aaa4e..a62b795c 100644 --- a/examples/docs/join.schema.md +++ b/examples/docs/join.schema.md @@ -33,6 +33,8 @@ A simple string. - is optional - type: `string` +- version: 1.0.0 +- testProperty: test ##### foo Type @@ -60,6 +62,8 @@ A simple string. - is optional - type: `string` +- version: 1.0.0 +- testProperty: test ##### bar Type diff --git a/examples/docs/nestedobj.schema.md b/examples/docs/nestedobj.schema.md index 9276d2c7..6758908d 100644 --- a/examples/docs/nestedobj.schema.md +++ b/examples/docs/nestedobj.schema.md @@ -28,6 +28,8 @@ settings - is optional - type: `object` - defined in this schema +- version: 1.0.0 +- testProperty: test ### settings Type @@ -45,6 +47,8 @@ collaborators - is optional - type: `object` +- version: 1.0.0 +- testProperty: test ##### collaborators Type @@ -60,6 +64,8 @@ collaborators - is optional - type: `string` +- version: 1.0.0 +- testProperty: test ##### id Type diff --git a/examples/docs/pattern.schema.md b/examples/docs/pattern.schema.md index 0e055c24..8bbdf63f 100644 --- a/examples/docs/pattern.schema.md +++ b/examples/docs/pattern.schema.md @@ -26,6 +26,8 @@ A simple string. - is a property pattern - type: `string` - defined in this schema +- version: 1.0.0 +- testProperty: test ### Pattern [0-9] Type diff --git a/examples/docs/simple.schema.md b/examples/docs/simple.schema.md index 1642f173..ecf4abd6 100644 --- a/examples/docs/simple.schema.md +++ b/examples/docs/simple.schema.md @@ -31,6 +31,8 @@ A unique identifier given to every addressable thing. - is optional - type: `string` - defined in this schema +- version: 1.0.0 +- testProperty: test ### id Type diff --git a/examples/docs/simpletypes.schema.md b/examples/docs/simpletypes.schema.md index c6b99c91..9eee5818 100644 --- a/examples/docs/simpletypes.schema.md +++ b/examples/docs/simpletypes.schema.md @@ -47,6 +47,8 @@ Guess what number is valid - is optional - type: `integer` - defined in this schema +- version: 1.0.0 +- testProperty: test ### integer_threes Type @@ -65,6 +67,8 @@ Just a whole number. I don't like fractions. Don't get too small - is optional - type: `integer` - defined in this schema +- version: 1.0.0 +- testProperty: test ### interger_constrained Type @@ -81,6 +85,8 @@ Just a whole number. I don't like fractions. - is optional - type: `integer` - defined in this schema +- version: 1.0.0 +- testProperty: test ### interger_unconstrained Type @@ -95,6 +101,8 @@ Just a number. Don't get too big. - is optional - type: `number` - defined in this schema +- version: 1.0.0 +- testProperty: test ### number_constrained Type @@ -111,6 +119,8 @@ Just a number - is optional - type: `number` - defined in this schema +- version: 1.0.0 +- testProperty: test ### number_unconstrained Type @@ -125,6 +135,8 @@ A date-like string. - is optional - type: `string` - defined in this schema +- version: 1.0.0 +- testProperty: test ### string_date Type @@ -141,6 +153,8 @@ An email-like string. - is optional - type: `string` - defined in this schema +- version: 1.0.0 +- testProperty: test ### string_email Type @@ -157,6 +171,8 @@ A hostname-like string. - is optional - type: `string` - defined in this schema +- version: 1.0.0 +- testProperty: test ### string_hostname Type @@ -173,6 +189,8 @@ An IPv4-like string. - is optional - type: `string` - defined in this schema +- version: 1.0.0 +- testProperty: test ### string_ipv4 Type @@ -189,6 +207,8 @@ An IPv6-like string. - is optional - type: `string` - defined in this schema +- version: 1.0.0 +- testProperty: test ### string_ipv6 Type @@ -205,6 +225,8 @@ A string with minumum and maximum length - is optional - type: `string` - defined in this schema +- version: 1.0.0 +- testProperty: test ### string_length Type @@ -232,6 +254,8 @@ A string following a regular expression - is optional - type: `string` - defined in this schema +- version: 1.0.0 +- testProperty: test ### string_pattern Type @@ -285,6 +309,8 @@ A string following a regular expression - is optional - type: `string` - defined in this schema +- version: 1.0.0 +- testProperty: test ### string_pattern_noexample Type @@ -305,6 +331,8 @@ A string following a regular expression - is optional - type: `string` - defined in this schema +- version: 1.0.0 +- testProperty: test ### string_pattern_singleexample Type @@ -333,6 +361,8 @@ A simple string, without any constraints. - is optional - type: `string` - defined in this schema +- version: 1.0.0 +- testProperty: test ### string_unconstrained Type @@ -353,6 +383,8 @@ A URI. - is optional - type: `string` - defined in this schema +- version: 1.0.0 +- testProperty: test ### string_uri Type @@ -367,6 +399,8 @@ A URI. - is **required** - type: `boolean` - defined in this schema +- version: 1.0.0 +- testProperty: test ### yesno Type diff --git a/examples/docs/stabilizing.schema.md b/examples/docs/stabilizing.schema.md index debee5e6..98478940 100644 --- a/examples/docs/stabilizing.schema.md +++ b/examples/docs/stabilizing.schema.md @@ -31,6 +31,8 @@ A unique identifier given to every addressable thing. - is optional - type: `string` - defined in this schema +- version: 1.0.0 +- testProperty: test ### id Type diff --git a/examples/docs/subdir/subdir.schema.md b/examples/docs/subdir/subdir.schema.md index 12e18684..9a48a506 100644 --- a/examples/docs/subdir/subdir.schema.md +++ b/examples/docs/subdir/subdir.schema.md @@ -31,6 +31,8 @@ A unique identifier given to every addressable thing. - is optional - type: `string` - defined in this schema +- version: 1.0.0 +- testProperty: test ### id Type diff --git a/examples/docs/typearrays.schema.md b/examples/docs/typearrays.schema.md index ff0c4a42..a5974b4e 100644 --- a/examples/docs/typearrays.schema.md +++ b/examples/docs/typearrays.schema.md @@ -34,6 +34,8 @@ This is just nothing - is optional - type: `null` - defined in this schema +- version: 1.0.0 +- testProperty: test ### null Type @@ -48,6 +50,8 @@ Nullable string - is optional - type: `string` - defined in this schema +- version: 1.0.0 +- testProperty: test ### string-or-null Type @@ -62,6 +66,8 @@ Types can be many things - is optional - type: multiple - defined in this schema +- version: 1.0.0 +- testProperty: test ### string-or-number Type @@ -79,6 +85,8 @@ Types can be many things, even nothing at all. - is optional - type: multiple - defined in this schema +- version: 1.0.0 +- testProperty: test ### string-or-number-null Type diff --git a/examples/generated-schemas/abstract.schema.json b/examples/generated-schemas/abstract.schema.json index 780b192c..52f23358 100644 --- a/examples/generated-schemas/abstract.schema.json +++ b/examples/generated-schemas/abstract.schema.json @@ -16,12 +16,16 @@ "properties": { "foo": { "type": "string", - "description": "A unique identifier given to every addressable thing." + "description": "A unique identifier given to every addressable thing.", + "version": "1.0.0", + "testProperty": "test" }, "nonfoo": { "type": "boolean", "const": false, - "description": "This is not foo." + "description": "This is not foo.", + "version": "1.0.0", + "testProperty": "test" } } }, @@ -30,7 +34,9 @@ "properties": { "bar": { "type": "string", - "description": "A unique identifier given to every addressable thing." + "description": "A unique identifier given to every addressable thing.", + "version": "1.0.0", + "testProperty": "test" } } } diff --git a/examples/generated-schemas/arrays.schema.json b/examples/generated-schemas/arrays.schema.json index 6dd4ee82..d9556c72 100644 --- a/examples/generated-schemas/arrays.schema.json +++ b/examples/generated-schemas/arrays.schema.json @@ -16,14 +16,18 @@ "description": "This is an array", "items": { "type": "string" - } + }, + "version": "1.0.0", + "testProperty": "test" }, "listlist": { "type": "array", "description": "This is an array of arrays", "items": { "type": "array" - } + }, + "version": "1.0.0", + "testProperty": "test" }, "stringlistlist": { "type": "array", @@ -33,7 +37,9 @@ "items": { "type": "string" } - } + }, + "version": "1.0.0", + "testProperty": "test" }, "intlist": { "type": "array", @@ -42,7 +48,9 @@ "type": "integer" }, "maxItems": 10, - "minItems": 1 + "minItems": 1, + "version": "1.0.0", + "testProperty": "test" }, "boollist": { "type": "array", @@ -50,7 +58,9 @@ "items": { "type": "boolean" }, - "minItems": 1 + "minItems": 1, + "version": "1.0.0", + "testProperty": "test" }, "numlist": { "type": "array", @@ -59,7 +69,9 @@ "type": "number", "minimum": 10 }, - "maxItems": 10 + "maxItems": 10, + "version": "1.0.0", + "testProperty": "test" }, "coordinatelist": { "type": "array", @@ -73,8 +85,12 @@ "type": "number", "minimum": 0, "maximum": 10 - } + }, + "version": "1.0.0", + "testProperty": "test" }, + "version": "1.0.0", + "testProperty": "test", "maxItems": 10 }, "objectlist": { @@ -88,14 +104,20 @@ "properties": { "a": { "type": "string", - "description": "The a property" + "description": "The a property", + "version": "1.0.0", + "testProperty": "test" }, "b": { "type": "integer", - "description": "The b property" + "description": "The b property", + "version": "1.0.0", + "testProperty": "test" } } - } + }, + "version": "1.0.0", + "testProperty": "test" }, "JoinTypelist": { "type": "array", @@ -111,9 +133,13 @@ "description": "A simple string.", "examples": [ "hello" - ] + ], + "version": "1.0.0", + "testProperty": "test" } - } + }, + "version": "1.0.0", + "testProperty": "test" }, { "type": "object", @@ -124,12 +150,16 @@ "description": "A simple string.", "examples": [ "world" - ] + ], + "version": "1.0.0", + "testProperty": "test" } } } ] - } + }, + "version": "1.0.0", + "testProperty": "test" } } } \ No newline at end of file diff --git a/examples/generated-schemas/complex.schema.json b/examples/generated-schemas/complex.schema.json index 2cfc7737..6280e59e 100644 --- a/examples/generated-schemas/complex.schema.json +++ b/examples/generated-schemas/complex.schema.json @@ -12,37 +12,55 @@ "description": "This is an example schema that uses types defined in other schemas.", "properties": { "refabstract": { - "$ref": "https://example.com/schemas/abstract#/definitions/first" + "$ref": "https://example.com/schemas/abstract#/definitions/first", + "version": "1.0.0", + "testProperty": "test" }, "refnamed": { - "$ref": "https://example.com/schemas/simple" + "$ref": "https://example.com/schemas/simple", + "version": "1.0.0", + "testProperty": "test" }, "reflist": { "type": "array", "items": { - "$ref": "https://example.com/schemas/simple" - } + "$ref": "https://example.com/schemas/simple", + "version": "1.0.0", + "testProperty": "test" + }, + "version": "1.0.0", + "testProperty": "test" }, "refobj": { "type": "object", "properties": { "foo": { - "$ref": "https://example.com/schemas/simple" + "$ref": "https://example.com/schemas/simple", + "version": "1.0.0", + "testProperty": "test" } - } + }, + "version": "1.0.0", + "testProperty": "test" }, "refnestedobj": { "type": "object", "properties": { "refobj": { "type": "object", + "version": "1.0.0", + "testProperty": "test", "properties": { "foo": { - "$ref": "https://example.com/schemas/simple" + "$ref": "https://example.com/schemas/simple", + "version": "1.0.0", + "testProperty": "test" } } } - } + }, + "version": "1.0.0", + "testProperty": "test" }, "or": { "description": "String or number…", @@ -54,7 +72,9 @@ "type": "number", "minimum": 0 } - ] + ], + "version": "1.0.0", + "testProperty": "test" }, "and": { "description": "Number in a range", @@ -67,7 +87,9 @@ "type": "number", "minimum": 0 } - ] + ], + "version": "1.0.0", + "testProperty": "test" }, "xor": { "description": "Exclusive choice.", @@ -80,7 +102,9 @@ "type": "number", "minimum": 10 } - ] + ], + "version": "1.0.0", + "testProperty": "test" } }, "required": [ @@ -89,10 +113,14 @@ "additionalProperties": true, "patternProperties": { "int.*": { - "type": "integer" + "type": "integer", + "version": "1.0.0", + "testProperty": "test" }, "str.*": { - "type": "string" + "type": "string", + "version": "1.0.0", + "testProperty": "test" } } } \ No newline at end of file diff --git a/examples/generated-schemas/constants.schema.json b/examples/generated-schemas/constants.schema.json index 6ac15c7d..68eeff22 100644 --- a/examples/generated-schemas/constants.schema.json +++ b/examples/generated-schemas/constants.schema.json @@ -14,7 +14,9 @@ "hello": { "type": "string", "const": "World", - "description": "A simple string, without strong constraints." + "description": "A simple string, without strong constraints.", + "version": "1.0.0", + "testProperty": "test" } }, "required": [ diff --git a/examples/generated-schemas/custom.schema.json b/examples/generated-schemas/custom.schema.json index febfea6e..5115570b 100644 --- a/examples/generated-schemas/custom.schema.json +++ b/examples/generated-schemas/custom.schema.json @@ -16,7 +16,9 @@ "properties": { "foo": { "type": "string", - "description": "A unique identifier given to every addressable thing." + "description": "A unique identifier given to every addressable thing.", + "version": "1.0.0", + "testProperty": "test" } } }, @@ -24,7 +26,9 @@ "properties": { "bar": { "type": "string", - "description": "A unique identifier given to every addressable thing." + "description": "A unique identifier given to every addressable thing.", + "version": "1.0.0", + "testProperty": "test" } } } diff --git a/examples/generated-schemas/deepextending.schema.json b/examples/generated-schemas/deepextending.schema.json index 72df4ee6..e23a1830 100644 --- a/examples/generated-schemas/deepextending.schema.json +++ b/examples/generated-schemas/deepextending.schema.json @@ -21,7 +21,9 @@ "properties": { "hey": { "type": "string", - "description": "A unique identifier given to every addressable thing." + "description": "A unique identifier given to every addressable thing.", + "version": "1.0.0", + "testProperty": "test" } } } diff --git a/examples/generated-schemas/definitions.schema.json b/examples/generated-schemas/definitions.schema.json index 4db48821..f25feb1b 100644 --- a/examples/generated-schemas/definitions.schema.json +++ b/examples/generated-schemas/definitions.schema.json @@ -15,17 +15,23 @@ "id": { "type": "string", "format": "uri-reference", - "description": "A unique identifier given to every addressable thing." + "description": "A unique identifier given to every addressable thing.", + "version": "1.0.0", + "testProperty": "test" }, "@id": { "type": "string", "format": "uri", - "description": "An `id` with an `@` in front of it. The `@` stands for \"dot com\"" + "description": "An `id` with an `@` in front of it. The `@` stands for \"dot com\"", + "version": "1.0.0", + "testProperty": "test" }, "meta:id": { "type": "string", "format": "email", - "description": "An about ids. It is meta. If you are confused, send an email to the address specified in this property value." + "description": "An about ids. It is meta. If you are confused, send an email to the address specified in this property value.", + "version": "1.0.0", + "testProperty": "test" } }, "required": [ diff --git a/examples/generated-schemas/enums.schema.json b/examples/generated-schemas/enums.schema.json index 879e9281..f9ad1c26 100644 --- a/examples/generated-schemas/enums.schema.json +++ b/examples/generated-schemas/enums.schema.json @@ -17,7 +17,9 @@ "World", "Welt" ], - "description": "A simple string. Pick a value." + "description": "A simple string. Pick a value.", + "version": "1.0.0", + "testProperty": "test" }, "nested": { "title": "Enumerated (Nested)", @@ -31,9 +33,13 @@ "object", "works" ], - "description": "A simple string. Pick a value." + "description": "A simple string. Pick a value.", + "version": "1.0.0", + "testProperty": "test" } - } + }, + "version": "1.0.0", + "testProperty": "test" } }, "required": [ diff --git a/examples/generated-schemas/example.schema.json b/examples/generated-schemas/example.schema.json index d2b2bd3e..757c1260 100644 --- a/examples/generated-schemas/example.schema.json +++ b/examples/generated-schemas/example.schema.json @@ -16,7 +16,9 @@ "description": "A simple string.", "examples": [ "bar" - ] + ], + "version": "1.0.0", + "testProperty": "test" }, "bar": { "type": "string", @@ -24,7 +26,9 @@ "examples": [ "bar", "baz" - ] + ], + "version": "1.0.0", + "testProperty": "test" } }, "examples": [ diff --git a/examples/generated-schemas/examples.schema.json b/examples/generated-schemas/examples.schema.json index d46f1b75..cd68bd73 100644 --- a/examples/generated-schemas/examples.schema.json +++ b/examples/generated-schemas/examples.schema.json @@ -16,7 +16,9 @@ "description": "A simple string.", "examples": [ "bar" - ] + ], + "version": "1.0.0", + "testProperty": "test" }, "bar": { "type": "string", @@ -24,7 +26,9 @@ "examples": [ "bar", "baz" - ] + ], + "version": "1.0.0", + "testProperty": "test" } }, "required": [ diff --git a/examples/generated-schemas/extending.schema.json b/examples/generated-schemas/extending.schema.json index f6e866e8..ac6ea40d 100644 --- a/examples/generated-schemas/extending.schema.json +++ b/examples/generated-schemas/extending.schema.json @@ -24,7 +24,9 @@ "examples": [ "I'm just a humble example" ], - "description": "This property has a unique name to demonstrate it's uniqueness." + "description": "This property has a unique name to demonstrate it's uniqueness.", + "version": "1.0.0", + "testProperty": "test" } } } diff --git a/examples/generated-schemas/extensible.schema.json b/examples/generated-schemas/extensible.schema.json index f5b31a3b..53c914fe 100644 --- a/examples/generated-schemas/extensible.schema.json +++ b/examples/generated-schemas/extensible.schema.json @@ -19,7 +19,9 @@ "examples": [ "bar" ], - "description": "A unique identifier given to every addressable thing." + "description": "A unique identifier given to every addressable thing.", + "version": "1.0.0", + "testProperty": "test" } } }, @@ -31,7 +33,9 @@ "whoo", "hoo" ], - "description": "A horse walks into it." + "description": "A horse walks into it.", + "version": "1.0.0", + "testProperty": "test" } } } diff --git a/examples/generated-schemas/identifiable.schema.json b/examples/generated-schemas/identifiable.schema.json index 94f700f6..462db573 100644 --- a/examples/generated-schemas/identifiable.schema.json +++ b/examples/generated-schemas/identifiable.schema.json @@ -19,7 +19,9 @@ "@id": { "type": "string", "format": "uri", - "description": "A unique identifier given to every addressable thing." + "description": "A unique identifier given to every addressable thing.", + "version": "1.0.0", + "testProperty": "test" } } } \ No newline at end of file diff --git a/examples/generated-schemas/join.schema.json b/examples/generated-schemas/join.schema.json index 81db9f99..51f1ea23 100644 --- a/examples/generated-schemas/join.schema.json +++ b/examples/generated-schemas/join.schema.json @@ -19,7 +19,9 @@ "description": "A simple string.", "examples": [ "hello" - ] + ], + "version": "1.0.0", + "testProperty": "test" } } }, @@ -32,7 +34,9 @@ "description": "A simple string.", "examples": [ "world" - ] + ], + "version": "1.0.0", + "testProperty": "test" } } } diff --git a/examples/generated-schemas/nestedobj.schema.json b/examples/generated-schemas/nestedobj.schema.json index 62f814d6..dcd90c53 100644 --- a/examples/generated-schemas/nestedobj.schema.json +++ b/examples/generated-schemas/nestedobj.schema.json @@ -18,11 +18,17 @@ }, "properties": { "id": { - "type": "string" + "type": "string", + "version": "1.0.0", + "testProperty": "test" } - } + }, + "version": "1.0.0", + "testProperty": "test" } - } + }, + "version": "1.0.0", + "testProperty": "test" } }, "additionalProperties": false diff --git a/examples/generated-schemas/pattern.schema.json b/examples/generated-schemas/pattern.schema.json index 5be82301..0618c64b 100644 --- a/examples/generated-schemas/pattern.schema.json +++ b/examples/generated-schemas/pattern.schema.json @@ -15,7 +15,9 @@ "description": "A simple string.", "examples": [ "bar" - ] + ], + "version": "1.0.0", + "testProperty": "test" } } } \ No newline at end of file diff --git a/examples/generated-schemas/simple.schema.json b/examples/generated-schemas/simple.schema.json index e49f5d6f..c442b55e 100644 --- a/examples/generated-schemas/simple.schema.json +++ b/examples/generated-schemas/simple.schema.json @@ -19,7 +19,9 @@ "id": { "type": "string", "format": "uri", - "description": "A unique identifier given to every addressable thing." + "description": "A unique identifier given to every addressable thing.", + "version": "1.0.0", + "testProperty": "test" } } } \ No newline at end of file diff --git a/examples/generated-schemas/simpletypes.schema.json b/examples/generated-schemas/simpletypes.schema.json index 533c4bad..124e66d2 100644 --- a/examples/generated-schemas/simpletypes.schema.json +++ b/examples/generated-schemas/simpletypes.schema.json @@ -16,7 +16,9 @@ "description": "A simple string, without any constraints.", "examples": [ "bar" - ] + ], + "version": "1.0.0", + "testProperty": "test" }, "string_length": { "type": "string", @@ -26,7 +28,9 @@ "baz" ], "minLength": 3, - "maxLength": 3 + "maxLength": 3, + "version": "1.0.0", + "testProperty": "test" }, "string_pattern": { "type": "string", @@ -48,12 +52,16 @@ "bas": "from ancient Egyptian religion, an aspect of the soul", "bat": "…out of hell", "bay": ", sitting by the dock of the" - } + }, + "version": "1.0.0", + "testProperty": "test" }, "string_pattern_noexample": { "type": "string", "description": "A string following a regular expression", - "pattern": "^ba.$" + "pattern": "^ba.$", + "version": "1.0.0", + "testProperty": "test" }, "string_pattern_singleexample": { "type": "string", @@ -61,65 +69,91 @@ "pattern": "^ba.$", "examples": [ "bar" - ] + ], + "version": "1.0.0", + "testProperty": "test" }, "string_date": { "type": "string", "description": "A date-like string.", - "format": "date-time" + "format": "date-time", + "version": "1.0.0", + "testProperty": "test" }, "string_email": { "type": "string", "description": "An email-like string.", - "format": "email" + "format": "email", + "version": "1.0.0", + "testProperty": "test" }, "string_hostname": { "type": "string", "description": "A hostname-like string.", - "format": "hostname" + "format": "hostname", + "version": "1.0.0", + "testProperty": "test" }, "string_ipv4": { "type": "string", "description": "An IPv4-like string.", - "format": "ipv4" + "format": "ipv4", + "version": "1.0.0", + "testProperty": "test" }, "string_ipv6": { "type": "string", "description": "An IPv6-like string.", - "format": "ipv6" + "format": "ipv6", + "version": "1.0.0", + "testProperty": "test" }, "string_uri": { "type": "string", "description": "A URI.", - "format": "uri" + "format": "uri", + "version": "1.0.0", + "testProperty": "test" }, "number_unconstrained": { "type": "number", - "description": "Just a number" + "description": "Just a number", + "version": "1.0.0", + "testProperty": "test" }, "interger_unconstrained": { "type": "integer", - "description": "Just a whole number. I don't like fractions." + "description": "Just a whole number. I don't like fractions.", + "version": "1.0.0", + "testProperty": "test" }, "interger_constrained": { "type": "integer", "description": "Just a whole number. I don't like fractions. Don't get too small", - "minimum": 10 + "minimum": 10, + "version": "1.0.0", + "testProperty": "test" }, "number_constrained": { "type": "number", "description": "Just a number. Don't get too big.", - "exclusiveMaximum": 10 + "exclusiveMaximum": 10, + "version": "1.0.0", + "testProperty": "test" }, "integer_threes": { "type": "integer", "description": "Guess what number is valid", "multipleOf": 3, "minimum": 2, - "maximum": 4 + "maximum": 4, + "version": "1.0.0", + "testProperty": "test" }, "yesno": { - "type": "boolean" + "type": "boolean", + "version": "1.0.0", + "testProperty": "test" } }, "required": [ diff --git a/examples/generated-schemas/stabilizing.schema.json b/examples/generated-schemas/stabilizing.schema.json index c0dcc1c2..4f0785c7 100644 --- a/examples/generated-schemas/stabilizing.schema.json +++ b/examples/generated-schemas/stabilizing.schema.json @@ -20,7 +20,9 @@ "id": { "type": "string", "format": "uri", - "description": "A unique identifier given to every addressable thing." + "description": "A unique identifier given to every addressable thing.", + "version": "1.0.0", + "testProperty": "test" } } } \ No newline at end of file diff --git a/examples/generated-schemas/subdir/subdir.schema.json b/examples/generated-schemas/subdir/subdir.schema.json index b5c14185..e6709892 100644 --- a/examples/generated-schemas/subdir/subdir.schema.json +++ b/examples/generated-schemas/subdir/subdir.schema.json @@ -16,7 +16,9 @@ "id": { "type": "string", "format": "uri", - "description": "A unique identifier given to every addressable thing." + "description": "A unique identifier given to every addressable thing.", + "version": "1.0.0", + "testProperty": "test" } } } diff --git a/examples/generated-schemas/typearrays.schema.json b/examples/generated-schemas/typearrays.schema.json index ca4fd9ee..eaa4df8b 100644 --- a/examples/generated-schemas/typearrays.schema.json +++ b/examples/generated-schemas/typearrays.schema.json @@ -18,21 +18,27 @@ "properties": { "null": { "type": "null", - "description": "This is just nothing" + "description": "This is just nothing", + "version": "1.0.0", + "testProperty": "test" }, "string-or-null": { "type": [ "string", "null" ], - "description": "Nullable string" + "description": "Nullable string", + "version": "1.0.0", + "testProperty": "test" }, "string-or-number": { "type": [ "string", "number" ], - "description": "Types can be many things" + "description": "Types can be many things", + "version": "1.0.0", + "testProperty": "test" }, "string-or-number-null": { "type": [ @@ -40,7 +46,9 @@ "number", "null" ], - "description": "Types can be many things, even nothing at all." + "description": "Types can be many things, even nothing at all.", + "version": "1.0.0", + "testProperty": "test" } } } \ No newline at end of file diff --git a/examples/schemas/abstract.schema.json b/examples/schemas/abstract.schema.json index 5d3a9ba9..f56e2a94 100644 --- a/examples/schemas/abstract.schema.json +++ b/examples/schemas/abstract.schema.json @@ -16,12 +16,16 @@ "properties": { "foo": { "type": "string", - "description": "A unique identifier given to every addressable thing." + "description": "A unique identifier given to every addressable thing.", + "version": "1.0.0", + "testProperty": "test" }, "nonfoo": { "type": "boolean", "const": false, - "description": "This is not foo." + "description": "This is not foo.", + "version": "1.0.0", + "testProperty": "test" } } }, @@ -30,7 +34,9 @@ "properties": { "bar": { "type": "string", - "description": "A unique identifier given to every addressable thing." + "description": "A unique identifier given to every addressable thing.", + "version": "1.0.0", + "testProperty": "test" } } } diff --git a/examples/schemas/arrays.schema.json b/examples/schemas/arrays.schema.json index 19b1a113..64fc5219 100644 --- a/examples/schemas/arrays.schema.json +++ b/examples/schemas/arrays.schema.json @@ -16,14 +16,18 @@ "description": "This is an array", "items": { "type": "string" - } + }, + "version": "1.0.0", + "testProperty": "test" }, "listlist": { "type": "array", "description": "This is an array of arrays", "items": { "type": "array" - } + }, + "version": "1.0.0", + "testProperty": "test" }, "stringlistlist": { "type": "array", @@ -33,7 +37,9 @@ "items": { "type": "string" } - } + }, + "version": "1.0.0", + "testProperty": "test" }, "intlist": { "type": "array", @@ -42,7 +48,9 @@ "type": "integer" }, "maxItems": 10, - "minItems": 1 + "minItems": 1, + "version": "1.0.0", + "testProperty": "test" }, "boollist": { "type": "array", @@ -50,7 +58,9 @@ "items": { "type": "boolean" }, - "minItems": 1 + "minItems": 1, + "version": "1.0.0", + "testProperty": "test" }, "numlist": { "type": "array", @@ -59,7 +69,9 @@ "type": "number", "minimum": 10 }, - "maxItems": 10 + "maxItems": 10, + "version": "1.0.0", + "testProperty": "test" }, "coordinatelist": { "type": "array", @@ -73,8 +85,12 @@ "type": "number", "minimum": 0, "maximum": 10 - } + }, + "version": "1.0.0", + "testProperty": "test" }, + "version": "1.0.0", + "testProperty": "test", "maxItems": 10 }, "objectlist": { @@ -88,14 +104,20 @@ "properties": { "a": { "type": "string", - "description": "The a property" + "description": "The a property", + "version": "1.0.0", + "testProperty": "test" }, "b": { "type": "integer", - "description": "The b property" + "description": "The b property", + "version": "1.0.0", + "testProperty": "test" } } - } + }, + "version": "1.0.0", + "testProperty": "test" }, "JoinTypelist": { "type": "array", @@ -111,9 +133,13 @@ "description": "A simple string.", "examples": [ "hello" - ] + ], + "version": "1.0.0", + "testProperty": "test" } - } + }, + "version": "1.0.0", + "testProperty": "test" }, { "type": "object", @@ -124,12 +150,16 @@ "description": "A simple string.", "examples": [ "world" - ] + ], + "version": "1.0.0", + "testProperty": "test" } } } ] - } + }, + "version": "1.0.0", + "testProperty": "test" } } } \ No newline at end of file diff --git a/examples/schemas/complex.schema.json b/examples/schemas/complex.schema.json index 21c867c7..912913bc 100644 --- a/examples/schemas/complex.schema.json +++ b/examples/schemas/complex.schema.json @@ -12,58 +12,82 @@ "description": "This is an example schema that uses types defined in other schemas.", "properties": { "refabstract": { - "$ref": "https://example.com/schemas/abstract#/definitions/first" + "$ref": "https://example.com/schemas/abstract#/definitions/first", + "version": "1.0.0", + "testProperty": "test" }, "refnamed": { - "$ref": "https://example.com/schemas/simple" + "$ref": "https://example.com/schemas/simple", + "version": "1.0.0", + "testProperty": "test" }, "reflist": { "type": "array", "items": { - "$ref": "https://example.com/schemas/simple" - } + "$ref": "https://example.com/schemas/simple", + "version": "1.0.0", + "testProperty": "test" + }, + "version": "1.0.0", + "testProperty": "test" }, "refobj": { "type": "object", "properties": { "foo": { - "$ref": "https://example.com/schemas/simple" + "$ref": "https://example.com/schemas/simple", + "version": "1.0.0", + "testProperty": "test" } - } + }, + "version": "1.0.0", + "testProperty": "test" }, "refnestedobj": { "type": "object", "properties": { "refobj": { "type": "object", + "version": "1.0.0", + "testProperty": "test", "properties": { "foo": { - "$ref": "https://example.com/schemas/simple" + "$ref": "https://example.com/schemas/simple", + "version": "1.0.0", + "testProperty": "test" } } } - } + }, + "version": "1.0.0", + "testProperty": "test" }, "or": { "description": "String or number…", "anyOf": [ { "type":"string" }, { "type":"number", "minimum": 0} - ] + ], + "version": "1.0.0", + "testProperty": "test" }, "and": { "description": "Number in a range", "allOf": [ { "type":"number", "maximum": 10 }, { "type":"number", "minimum": 0} - ] + ], + "version": "1.0.0", + "testProperty": "test" }, "xor": { "description": "Exclusive choice.", "oneOf": [ { "type":"number", "maximum": 0 }, { "type":"number", "minimum": 10} - ] + ], + "version": "1.0.0", + "testProperty": "test" } }, "required": [ @@ -72,10 +96,14 @@ "additionalProperties": true, "patternProperties": { "int.*": { - "type": "integer" + "type": "integer", + "version": "1.0.0", + "testProperty": "test" }, "str.*": { - "type":"string" + "type":"string", + "version": "1.0.0", + "testProperty": "test" } } } \ No newline at end of file diff --git a/examples/schemas/constants.schema.json b/examples/schemas/constants.schema.json index f3843c36..e1ec4f8a 100644 --- a/examples/schemas/constants.schema.json +++ b/examples/schemas/constants.schema.json @@ -14,7 +14,9 @@ "hello": { "type": "string", "const": "World", - "description": "A simple string, without strong constraints." + "description": "A simple string, without strong constraints.", + "version": "1.0.0", + "testProperty": "test" } }, "required": [ diff --git a/examples/schemas/custom.schema.json b/examples/schemas/custom.schema.json index d80987f6..b82ec96b 100644 --- a/examples/schemas/custom.schema.json +++ b/examples/schemas/custom.schema.json @@ -16,7 +16,9 @@ "properties": { "foo": { "type": "string", - "description": "A unique identifier given to every addressable thing." + "description": "A unique identifier given to every addressable thing.", + "version": "1.0.0", + "testProperty": "test" } } }, @@ -24,7 +26,9 @@ "properties": { "bar": { "type": "string", - "description": "A unique identifier given to every addressable thing." + "description": "A unique identifier given to every addressable thing.", + "version": "1.0.0", + "testProperty": "test" } } } diff --git a/examples/schemas/deepextending.schema.json b/examples/schemas/deepextending.schema.json index 192707d9..79a8aabf 100644 --- a/examples/schemas/deepextending.schema.json +++ b/examples/schemas/deepextending.schema.json @@ -21,7 +21,9 @@ "properties": { "hey": { "type": "string", - "description": "A unique identifier given to every addressable thing." + "description": "A unique identifier given to every addressable thing.", + "version": "1.0.0", + "testProperty": "test" } } } diff --git a/examples/schemas/definitions.schema.json b/examples/schemas/definitions.schema.json index 01414198..1b960412 100644 --- a/examples/schemas/definitions.schema.json +++ b/examples/schemas/definitions.schema.json @@ -15,17 +15,23 @@ "id": { "type": "string", "format": "uri-reference", - "description": "A unique identifier given to every addressable thing." + "description": "A unique identifier given to every addressable thing.", + "version": "1.0.0", + "testProperty": "test" }, "@id": { "type": "string", "format": "uri", - "description": "An `id` with an `@` in front of it. The `@` stands for \"dot com\"" + "description": "An `id` with an `@` in front of it. The `@` stands for \"dot com\"", + "version": "1.0.0", + "testProperty": "test" }, "meta:id": { "type": "string", "format": "email", - "description": "An about ids. It is meta. If you are confused, send an email to the address specified in this property value." + "description": "An about ids. It is meta. If you are confused, send an email to the address specified in this property value.", + "version": "1.0.0", + "testProperty": "test" } }, "required": ["@id"] diff --git a/examples/schemas/enums.schema.json b/examples/schemas/enums.schema.json index b0c4e8ba..fb3ed62e 100644 --- a/examples/schemas/enums.schema.json +++ b/examples/schemas/enums.schema.json @@ -14,7 +14,9 @@ "hello": { "type": "string", "enum": ["World", "Welt"], - "description": "A simple string. Pick a value." + "description": "A simple string. Pick a value.", + "version": "1.0.0", + "testProperty": "test" }, "nested": { @@ -25,9 +27,13 @@ "test": { "type": "string", "enum": ["nested", "object", "works"], - "description": "A simple string. Pick a value." + "description": "A simple string. Pick a value.", + "version": "1.0.0", + "testProperty": "test" } - } + }, + "version": "1.0.0", + "testProperty": "test" } }, "required": [ diff --git a/examples/schemas/example.schema.json b/examples/schemas/example.schema.json index c9c3a6c8..603db119 100644 --- a/examples/schemas/example.schema.json +++ b/examples/schemas/example.schema.json @@ -14,12 +14,16 @@ "foo": { "type": "string", "description": "A simple string.", - "examples": ["bar"] + "examples": ["bar"], + "version": "1.0.0", + "testProperty": "test" }, "bar": { "type": "string", "description": "A simple string.", - "examples": ["bar", "baz"] + "examples": ["bar", "baz"], + "version": "1.0.0", + "testProperty": "test" } } } diff --git a/examples/schemas/examples.schema.json b/examples/schemas/examples.schema.json index a678221f..3cfa4677 100644 --- a/examples/schemas/examples.schema.json +++ b/examples/schemas/examples.schema.json @@ -14,12 +14,16 @@ "foo": { "type": "string", "description": "A simple string.", - "examples": ["bar"] + "examples": ["bar"], + "version": "1.0.0", + "testProperty": "test" }, "bar": { "type": "string", "description": "A simple string.", - "examples": ["bar", "baz"] + "examples": ["bar", "baz"], + "version": "1.0.0", + "testProperty": "test" } }, "required": [ diff --git a/examples/schemas/extending.schema.json b/examples/schemas/extending.schema.json index 5d132241..e5d2fb6f 100644 --- a/examples/schemas/extending.schema.json +++ b/examples/schemas/extending.schema.json @@ -22,7 +22,9 @@ "type": "string", "title": "BAAAZ!", "examples": ["I'm just a humble example"], - "description": "This property has a unique name to demonstrate it's uniqueness." + "description": "This property has a unique name to demonstrate it's uniqueness.", + "version": "1.0.0", + "testProperty": "test" } } } diff --git a/examples/schemas/extensible.schema.json b/examples/schemas/extensible.schema.json index be75f1bf..f8532f62 100644 --- a/examples/schemas/extensible.schema.json +++ b/examples/schemas/extensible.schema.json @@ -17,7 +17,9 @@ "foo": { "type": "string", "examples": ["bar"], - "description": "A unique identifier given to every addressable thing." + "description": "A unique identifier given to every addressable thing.", + "version": "1.0.0", + "testProperty": "test" } } }, @@ -26,7 +28,9 @@ "bar": { "type": "string", "examples": [ "whoo", "hoo"], - "description": "A horse walks into it." + "description": "A horse walks into it.", + "version": "1.0.0", + "testProperty": "test" } } } diff --git a/examples/schemas/identifiable.schema.json b/examples/schemas/identifiable.schema.json index 94d1751a..c036024f 100644 --- a/examples/schemas/identifiable.schema.json +++ b/examples/schemas/identifiable.schema.json @@ -19,7 +19,9 @@ "@id": { "type": "string", "format": "uri", - "description": "A unique identifier given to every addressable thing." + "description": "A unique identifier given to every addressable thing.", + "version": "1.0.0", + "testProperty": "test" } } } diff --git a/examples/schemas/join.schema.json b/examples/schemas/join.schema.json index 81db9f99..51f1ea23 100644 --- a/examples/schemas/join.schema.json +++ b/examples/schemas/join.schema.json @@ -19,7 +19,9 @@ "description": "A simple string.", "examples": [ "hello" - ] + ], + "version": "1.0.0", + "testProperty": "test" } } }, @@ -32,7 +34,9 @@ "description": "A simple string.", "examples": [ "world" - ] + ], + "version": "1.0.0", + "testProperty": "test" } } } diff --git a/examples/schemas/nestedobj.schema.json b/examples/schemas/nestedobj.schema.json index f068d4e5..1a17a57a 100644 --- a/examples/schemas/nestedobj.schema.json +++ b/examples/schemas/nestedobj.schema.json @@ -18,11 +18,17 @@ }, "properties": { "id": { - "type": "string" + "type": "string", + "version": "1.0.0", + "testProperty": "test" } - } + }, + "version": "1.0.0", + "testProperty": "test" } - } + }, + "version": "1.0.0", + "testProperty": "test" } }, "additionalProperties": false diff --git a/examples/schemas/pattern.schema.json b/examples/schemas/pattern.schema.json index cfe79132..7b406805 100644 --- a/examples/schemas/pattern.schema.json +++ b/examples/schemas/pattern.schema.json @@ -13,7 +13,9 @@ "[0-9]": { "type": "string", "description": "A simple string.", - "examples": ["bar"] + "examples": ["bar"], + "version": "1.0.0", + "testProperty": "test" } } } \ No newline at end of file diff --git a/examples/schemas/simple.schema.json b/examples/schemas/simple.schema.json index b666ee94..acac01ea 100644 --- a/examples/schemas/simple.schema.json +++ b/examples/schemas/simple.schema.json @@ -19,7 +19,9 @@ "id": { "type": "string", "format": "uri", - "description": "A unique identifier given to every addressable thing." + "description": "A unique identifier given to every addressable thing.", + "version": "1.0.0", + "testProperty": "test" } } } \ No newline at end of file diff --git a/examples/schemas/simpletypes.schema.json b/examples/schemas/simpletypes.schema.json index 93f83493..d176a8cc 100644 --- a/examples/schemas/simpletypes.schema.json +++ b/examples/schemas/simpletypes.schema.json @@ -14,14 +14,18 @@ "string_unconstrained": { "type": "string", "description": "A simple string, without any constraints.", - "examples": ["bar"] + "examples": ["bar"], + "version": "1.0.0", + "testProperty": "test" }, "string_length": { "type": "string", "description": "A string with minumum and maximum length", "examples": ["bar", "baz"], "minLength": 3, - "maxLength": 3 + "maxLength": 3, + "version": "1.0.0", + "testProperty": "test" }, "string_pattern": { "type": "string", @@ -39,76 +43,106 @@ "bas": "from ancient Egyptian religion, an aspect of the soul", "bat": "…out of hell", "bay": ", sitting by the dock of the" - } + }, + "version": "1.0.0", + "testProperty": "test" }, "string_pattern_noexample": { "type": "string", "description": "A string following a regular expression", - "pattern": "^ba.$" + "pattern": "^ba.$", + "version": "1.0.0", + "testProperty": "test" }, "string_pattern_singleexample": { "type": "string", "description": "A string following a regular expression", "pattern": "^ba.$", - "examples": ["bar"] + "examples": ["bar"], + "version": "1.0.0", + "testProperty": "test" }, "string_date": { "type": "string", "description": "A date-like string.", - "format": "date-time" + "format": "date-time", + "version": "1.0.0", + "testProperty": "test" }, "string_email": { "type": "string", "description": "An email-like string.", - "format": "email" + "format": "email", + "version": "1.0.0", + "testProperty": "test" }, "string_hostname": { "type": "string", "description": "A hostname-like string.", - "format": "hostname" + "format": "hostname", + "version": "1.0.0", + "testProperty": "test" }, "string_ipv4": { "type": "string", "description": "An IPv4-like string.", - "format": "ipv4" + "format": "ipv4", + "version": "1.0.0", + "testProperty": "test" }, "string_ipv6": { "type": "string", "description": "An IPv6-like string.", - "format": "ipv6" + "format": "ipv6", + "version": "1.0.0", + "testProperty": "test" }, "string_uri": { "type": "string", "description": "A URI.", - "format": "uri" + "format": "uri", + "version": "1.0.0", + "testProperty": "test" }, "number_unconstrained": { "type": "number", - "description": "Just a number" + "description": "Just a number", + "version": "1.0.0", + "testProperty": "test" }, "interger_unconstrained": { "type": "integer", - "description": "Just a whole number. I don't like fractions." + "description": "Just a whole number. I don't like fractions.", + "version": "1.0.0", + "testProperty": "test" }, "interger_constrained": { "type": "integer", "description": "Just a whole number. I don't like fractions. Don't get too small", - "minimum": 10 + "minimum": 10, + "version": "1.0.0", + "testProperty": "test" }, "number_constrained": { "type": "number", "description": "Just a number. Don't get too big.", - "exclusiveMaximum": 10 + "exclusiveMaximum": 10, + "version": "1.0.0", + "testProperty": "test" }, "integer_threes": { "type":"integer", "description": "Guess what number is valid", "multipleOf": 3, "minimum": 2, - "maximum": 4 + "maximum": 4, + "version": "1.0.0", + "testProperty": "test" }, "yesno": { - "type": "boolean" + "type": "boolean", + "version": "1.0.0", + "testProperty": "test" } }, "required": [ diff --git a/examples/schemas/stabilizing.schema.json b/examples/schemas/stabilizing.schema.json index e7d95b70..6c54f039 100644 --- a/examples/schemas/stabilizing.schema.json +++ b/examples/schemas/stabilizing.schema.json @@ -20,7 +20,9 @@ "id": { "type": "string", "format": "uri", - "description": "A unique identifier given to every addressable thing." + "description": "A unique identifier given to every addressable thing.", + "version": "1.0.0", + "testProperty": "test" } } } \ No newline at end of file diff --git a/examples/schemas/subdir/subdir.schema.json b/examples/schemas/subdir/subdir.schema.json index 59493da5..38d1a764 100644 --- a/examples/schemas/subdir/subdir.schema.json +++ b/examples/schemas/subdir/subdir.schema.json @@ -16,7 +16,9 @@ "id": { "type": "string", "format": "uri", - "description": "A unique identifier given to every addressable thing." + "description": "A unique identifier given to every addressable thing.", + "version": "1.0.0", + "testProperty": "test" } } } diff --git a/examples/schemas/typearrays.schema.json b/examples/schemas/typearrays.schema.json index 60438f0a..463286d1 100644 --- a/examples/schemas/typearrays.schema.json +++ b/examples/schemas/typearrays.schema.json @@ -18,19 +18,27 @@ "properties": { "null": { "type": "null", - "description": "This is just nothing" + "description": "This is just nothing", + "version": "1.0.0", + "testProperty": "test" }, "string-or-null": { "type": ["string", "null"], - "description": "Nullable string" + "description": "Nullable string", + "version": "1.0.0", + "testProperty": "test" }, "string-or-number": { "type": ["string", "number"], - "description": "Types can be many things" + "description": "Types can be many things", + "version": "1.0.0", + "testProperty": "test" }, "string-or-number-null": { "type": ["string", "number", "null"], - "description": "Types can be many things, even nothing at all." + "description": "Types can be many things, even nothing at all.", + "version": "1.0.0", + "testProperty": "test" } } } \ No newline at end of file diff --git a/lib/markdownWriter.js b/lib/markdownWriter.js index 180d3075..93bf0586 100644 --- a/lib/markdownWriter.js +++ b/lib/markdownWriter.js @@ -94,7 +94,7 @@ function simpletype(prop) { } for (let i = 0; i < prop.enum.length; i += 1) { if (prop['meta:enum'][prop.enum[i]] === undefined) { - // setting an empty description for each unknown enum + // setting an empty description for each unknown enum prop['meta:enum'][prop.enum[i]] = ''; } } @@ -162,12 +162,16 @@ function requiredProperties(properties, required) { function ejsRender(template, ctx) { const p = pejs.renderFileAsync(path.join(__dirname, `../templates/md/${template}.ejs`), ctx, { debug: false }); return p.value(); - // return JSON.stringify(obj, null, 2); + // return JSON.stringify(obj, null, 2); } const generateMarkdown = (filename, schema, schemaPath, outDir, dependencyMap, docs, consoleArgs) => { outDir = outDir || path.resolve(path.join('.', 'out')); + let customElements = []; + if (consoleArgs !== undefined && consoleArgs.p !== undefined) { + customElements = consoleArgs.p.split(','); + } // this structure allows us to have separate templates for each element. Instead of having // one huge template, each block can be built individually outDir = outDir || path.resolve(path.join('.', 'out')); @@ -182,7 +186,7 @@ const generateMarkdown = (filename, schema, schemaPath, outDir, }]); } multi.push(['examples.ejs', { examples: stringifyExamples(schema.examples), title: schema.title, i18n }]); - const required = []; // to store required of whole schema, even those in definitions + const required = []; // to store required of whole schema, even those in definitions // Processing schema.definitions before schema.properties to get any // required properties present in definitions @@ -225,6 +229,7 @@ const generateMarkdown = (filename, schema, schemaPath, outDir, schema: simpletype(abstract[name]), nameSlug: propertiesSlugs[name], i18n, + customElements, }]); } } @@ -255,6 +260,7 @@ const generateMarkdown = (filename, schema, schemaPath, outDir, schema: simpletype(schema.properties[name]), nameSlug: propertiesSlugs[name], i18n, + customElements, }]); } } @@ -269,6 +275,7 @@ const generateMarkdown = (filename, schema, schemaPath, outDir, ejs: ejsRender, schema: simpletype(schema.patternProperties[name]), i18n, + customElements, }]); } } @@ -284,6 +291,7 @@ const generateMarkdown = (filename, schema, schemaPath, outDir, schemas: simpletype(joinType), schema: simpletype(schema), i18n, + customElements, }]); } } diff --git a/package-lock.json b/package-lock.json index 45cb4661..69885ec8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -283,7 +283,7 @@ "@samverschueren/stream-to-observable": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/@samverschueren/stream-to-observable/-/stream-to-observable-0.3.0.tgz", - "integrity": "sha512-MI4Xx6LHs4Webyvi6EbspgyAb4D2Q2VtnCQ1blOJcoLS6mVa8lNN2rkIy1CVxfTUpoyIbCTkXES1rLXztFD1lg==", + "integrity": "sha1-7N9I1TLFjqR3rPyrgDSEJPjQZi8=", "dev": true, "requires": { "any-observable": "^0.3.0" @@ -891,7 +891,7 @@ "JSONStream": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", - "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", + "integrity": "sha1-MgjB8I06TZkmGrZPkjArwV4RHKA=", "requires": { "jsonparse": "^1.2.0", "through": ">=2.2.7 <3" @@ -944,7 +944,6 @@ "version": "6.10.2", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz", "integrity": "sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==", - "dev": true, "requires": { "fast-deep-equal": "^2.0.1", "fast-json-stable-stringify": "^2.0.0", @@ -1052,7 +1051,7 @@ "any-observable": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/any-observable/-/any-observable-0.3.0.tgz", - "integrity": "sha512-/FQM1EDkTsf63Ub2C6O7GuYFDsSXUwsaZDurV0np41ocwq0jthUAYCmhBX9f+KwlaCgIuWyr/4WlUQUBfKfZog==", + "integrity": "sha1-r5M0deWAamfQ198JDdXovvZdEZs=", "dev": true }, "aproba": { @@ -1172,7 +1171,7 @@ "astral-regex": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", - "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", + "integrity": "sha1-bIw/uCfdQ+45GPJ7gngqt2WKb9k=", "dev": true }, "atob": { @@ -2038,7 +2037,7 @@ "conventional-changelog-angular": { "version": "5.0.3", "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-5.0.3.tgz", - "integrity": "sha512-YD1xzH7r9yXQte/HF9JBuEDfvjxxwDGGwZU1+ndanbY0oFgA+Po1T9JDSpPLdP0pZT6MhCAsdvFKC4TJ4MTJTA==", + "integrity": "sha1-KZ/dQ99aHwlSg6wWru37CmguyrA=", "dev": true, "requires": { "compare-func": "^1.3.1", @@ -2116,7 +2115,7 @@ "conventional-commits-filter": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/conventional-commits-filter/-/conventional-commits-filter-2.0.1.tgz", - "integrity": "sha512-92OU8pz/977udhBjgPEbg3sbYzIxMDFTlQT97w7KdhR9igNqdJvy8smmedAAgn4tPiqseFloKkrVfbXCVd+E7A==", + "integrity": "sha1-VaE13hgC9lELZ1jgpqqeCyhhjbM=", "dev": true, "requires": { "is-subset": "^0.1.1", @@ -2126,7 +2125,7 @@ "conventional-commits-parser": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-3.0.1.tgz", - "integrity": "sha512-P6U5UOvDeidUJ8ebHVDIoXzI7gMlQ1OF/id6oUvp8cnZvOXMt1n8nYl74Ey9YMn0uVQtxmCtjPQawpsssBWtGg==", + "integrity": "sha1-/hxJdT3z+Y7bIoWl5IXhH/p/Lkw=", "dev": true, "requires": { "JSONStream": "^1.0.4", @@ -2446,13 +2445,13 @@ "date-fns": { "version": "1.30.1", "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-1.30.1.tgz", - "integrity": "sha512-hBSVCvSmWC+QypYObzwGOd9wqdDpOt+0wl0KbU+R+uuZBS1jN8VsD1ss3irQDknRj5NvxiTF6oj/nDRnN/UQNw==", + "integrity": "sha1-LnG/CxGRU9u0zE6I2epaz7UNwFw=", "dev": true }, "dateformat": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz", - "integrity": "sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==", + "integrity": "sha1-puN0maTZqc+F71hyBE1ikByYia4=", "dev": true }, "debug": { @@ -2509,7 +2508,7 @@ "deep-extend": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==" + "integrity": "sha1-xPp8lUBKF6nD6Mp+FTcxK3NjMKw=" }, "deep-is": { "version": "0.1.3", @@ -2664,7 +2663,7 @@ "doctrine": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "integrity": "sha1-rd6+rXKmV023g2OdyHoSF3OXOWE=", "dev": true, "requires": { "esutils": "^2.0.2" @@ -3242,7 +3241,7 @@ "esquery": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz", - "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", + "integrity": "sha1-QGxRZYsfWZGl+bYrHcJbAOPlxwg=", "dev": true, "requires": { "estraverse": "^4.0.0" @@ -3251,7 +3250,7 @@ "esrecurse": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", - "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "integrity": "sha1-AHo7n9vCs7uH5IeeoZyS/b05Qs8=", "dev": true, "requires": { "estraverse": "^4.1.0" @@ -3461,8 +3460,7 @@ "fast-deep-equal": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", - "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", - "dev": true + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=" }, "fast-diff": { "version": "1.2.0", @@ -3540,8 +3538,7 @@ "fast-json-stable-stringify": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", - "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", - "dev": true + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" }, "fast-levenshtein": { "version": "2.0.6", @@ -3582,7 +3579,7 @@ "file-entry-cache": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", - "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", + "integrity": "sha1-yg9u+m3T1WEzP7FFFQZcL6/fQ5w=", "dev": true, "requires": { "flat-cache": "^2.0.1" @@ -3698,7 +3695,7 @@ "flat-cache": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", - "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "integrity": "sha1-XSltbwS9pEpGMKMBQTvbwuwIXsA=", "dev": true, "requires": { "flatted": "^2.0.0", @@ -3858,7 +3855,7 @@ "get-own-enumerable-property-symbols": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.0.tgz", - "integrity": "sha512-CIJYJC4GGF06TakLg8z4GQKvDsx9EMspVxOYih7LerEL/WosUnFIww45CGfxfeKHqlg3twgUrYRT1O3WQqjGCg==", + "integrity": "sha1-uHe0mlwWrvrDZV8u0upbaE340gM=", "dev": true }, "get-stdin": { @@ -4262,7 +4259,7 @@ "http-proxy-agent": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz", - "integrity": "sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg==", + "integrity": "sha1-5IIb7vWyFCogJr1zkm/lN2McVAU=", "requires": { "agent-base": "4", "debug": "3.1.0" @@ -4271,7 +4268,7 @@ "debug": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", "requires": { "ms": "2.0.0" } @@ -4347,7 +4344,7 @@ "ignore": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "integrity": "sha1-dQ49tYYgh7RzfrrIIH/9HvJ7Jfw=", "dev": true }, "ignore-walk": { @@ -4665,7 +4662,7 @@ "is-observable": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-observable/-/is-observable-1.1.0.tgz", - "integrity": "sha512-NqCa4Sa2d+u7BWc6CukaObG3Fh+CU9bvixbpcXYhy2VvYS7vVGIdAgnIS5Ks3A/cqk4rebLJ9s8zBstT2aKnIA==", + "integrity": "sha1-s+mGyPRN6VCGfKtUA/WjRlAFl14=", "dev": true, "requires": { "symbol-observable": "^1.1.0" @@ -4674,13 +4671,13 @@ "is-path-cwd": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz", - "integrity": "sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==", + "integrity": "sha1-Z9Q7gmZKe1GR/ZEZEn6zAASKn9s=", "dev": true }, "is-path-in-cwd": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-2.1.0.tgz", - "integrity": "sha512-rNocXHgipO+rvnP6dk3zI20RpOtrAM/kzbB258Uw5BWr3TpXi861yzjo16Dn4hUox07iw5AyeMLHWsujkjzvRQ==", + "integrity": "sha1-v+Lcomxp85cmWkAJljYCk1oFOss=", "dev": true, "requires": { "is-path-inside": "^2.1.0" @@ -4689,7 +4686,7 @@ "is-path-inside": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-2.1.0.tgz", - "integrity": "sha512-wiyhTzfDWsvwAW53OBWF5zuvaOGlZ6PwYxAbPVDhpm+gM09xKQGjBq/8uYN12aDvMxnAnq3dxTyoSoRNmg5YFg==", + "integrity": "sha1-fJgQWH1lmkDSe8201WFuqwWUlLI=", "dev": true, "requires": { "path-is-inside": "^1.0.2" @@ -4952,7 +4949,7 @@ "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "integrity": "sha1-GSA/tZmR35jjoocFDUZHzerzJJk=", "dev": true }, "js-yaml": { @@ -4993,8 +4990,7 @@ "json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" }, "json-stable-stringify-without-jsonify": { "version": "1.0.1", @@ -5321,7 +5317,7 @@ "listr": { "version": "0.14.3", "resolved": "https://registry.npmjs.org/listr/-/listr-0.14.3.tgz", - "integrity": "sha512-RmAl7su35BFd/xoMamRjpIE4j3v+L28o8CT5YhAXQJm1fD+1l9ngXY8JAQRJ+tFK2i5njvi0iRUKV09vPwA0iA==", + "integrity": "sha1-L+qQlgTkNL5GTFC926DUlpKPpYY=", "dev": true, "requires": { "@samverschueren/stream-to-observable": "^0.3.0", @@ -5344,7 +5340,7 @@ "listr-update-renderer": { "version": "0.5.0", "resolved": "https://registry.npmjs.org/listr-update-renderer/-/listr-update-renderer-0.5.0.tgz", - "integrity": "sha512-tKRsZpKz8GSGqoI/+caPmfrypiaq+OQCbd+CovEC24uk1h952lVj5sC7SqyFUm+OaJ5HN/a1YLt5cit2FMNsFA==", + "integrity": "sha1-Tqg2hUinuK7LfgbYyVy0WuLt5qI=", "dev": true, "requires": { "chalk": "^1.1.3", @@ -5421,7 +5417,7 @@ "listr-verbose-renderer": { "version": "0.5.0", "resolved": "https://registry.npmjs.org/listr-verbose-renderer/-/listr-verbose-renderer-0.5.0.tgz", - "integrity": "sha512-04PDPqSlsqIOaaaGZ+41vq5FejI9auqTInicFRndCBgE3bXG8D6W1I+mWhk+1nqbHmyhla/6BUrd5OSiHwKRXw==", + "integrity": "sha1-8RMhZ1NepMEmEQK58o2sfLoeA9s=", "dev": true, "requires": { "chalk": "^2.4.1", @@ -5564,7 +5560,7 @@ "log-symbols": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", - "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==", + "integrity": "sha1-86CFFqXeqJMzan3uFNGKHP2rd8Q=", "dev": true, "requires": { "chalk": "^2.4.2" @@ -5727,7 +5723,7 @@ "meow": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/meow/-/meow-4.0.1.tgz", - "integrity": "sha512-xcSBHD5Z86zaOc+781KrupuHAzeGXSLtiAOmBsiLDiPSaYSB6hdew2ng9EBAnZ62jagG9MHAOdxpDi/lWBFJ/A==", + "integrity": "sha1-1IWY9vSxRy81v2MXqVlFrONH+XU=", "dev": true, "requires": { "camelcase-keys": "^4.0.0", @@ -5768,7 +5764,7 @@ "merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "integrity": "sha1-UoI2KaFN0AyXcPtq1H3GMQ8sH2A=", "dev": true }, "merge2": { @@ -5861,7 +5857,7 @@ "minimist-options": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-3.0.2.tgz", - "integrity": "sha512-FyBrT/d0d4+uiZRbqznPXqw3IpZZG3gl3wKWiX784FycUKVwBt0uLBFkQrtE4tZOrgo78nZp2jnKz3L65T5LdQ==", + "integrity": "sha1-+6TIGRM54T7PTWG+sD8HAQPz2VQ=", "dev": true, "requires": { "arrify": "^1.0.1", @@ -5950,7 +5946,7 @@ "modify-values": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/modify-values/-/modify-values-1.0.1.tgz", - "integrity": "sha512-xV2bxeN6F7oYjZWTe/YPAy6MN2M+sL4u/Rlm2AHCIVGfo2p1yGmBHQ6vHehl4bRTZBdHu3TSkWdYgkwpYzAGSw==", + "integrity": "sha1-s5OfpgVUZHTj4+PGPWS9Q7TuYCI=", "dev": true }, "move-concurrently": { @@ -6220,7 +6216,7 @@ "node-emoji": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/node-emoji/-/node-emoji-1.10.0.tgz", - "integrity": "sha512-Yt3384If5H6BYGVHiHwTL+99OzJKHhgp82S8/dktEK73T26BazdgZ4JZh92xSVtGNJvz9UbXdNAc5hcrXV42vw==", + "integrity": "sha1-iIar0l2ce7YYAqZYUj0fjSqJsto=", "dev": true, "requires": { "lodash.toarray": "^4.4.0" @@ -6253,7 +6249,7 @@ "normalize-package-data": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "integrity": "sha1-5m2xg4sgDB38IzIl0SyzZSDiNKg=", "requires": { "hosted-git-info": "^2.1.4", "resolve": "^1.10.0", @@ -9994,7 +9990,7 @@ "octokit-pagination-methods": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/octokit-pagination-methods/-/octokit-pagination-methods-1.1.0.tgz", - "integrity": "sha512-fZ4qZdQ2nxJvtcasX7Ghl+WlWS/d9IgnBIwFZXVNNZUmzpno91SX5bc5vuxiuKoCtK78XxGGNuSCrDC7xYB3OQ==", + "integrity": "sha1-z0cu3J1VEFX573P25CtNu0yAvqQ=", "dev": true }, "once": { @@ -10151,7 +10147,7 @@ "p-limit": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "integrity": "sha1-uGvV8MJWkJEcdZD8v8IBDVSzzLg=", "dev": true, "requires": { "p-try": "^1.0.0" @@ -10330,7 +10326,7 @@ "parse-github-url": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/parse-github-url/-/parse-github-url-1.0.2.tgz", - "integrity": "sha512-kgBf6avCbO3Cn6+RnzRGLkUsv4ZVqv/VfAYkRsyBcgkshNvVBkRn1FEZcW0Jb+npXQWm2vHPnnOqFteZxRRGNw==", + "integrity": "sha1-JC07ZcvN2hS7UEOeMkKs9pcds5U=", "dev": true }, "parse-json": { @@ -10404,7 +10400,7 @@ "path-parse": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==" + "integrity": "sha1-1i27VnlAXXLEc37FhgDp3c8G0kw=" }, "path-type": { "version": "3.0.0", @@ -10499,7 +10495,7 @@ "progress": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==" + "integrity": "sha1-foz42PW48jnBvGi+tOt4Vn1XLvg=" }, "promise": { "version": "7.3.1", @@ -10650,8 +10646,7 @@ "punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" }, "q": { "version": "1.5.1", @@ -10679,7 +10674,7 @@ "rc": { "version": "1.2.8", "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "integrity": "sha1-zZJL9SAKB1uDwYjNa54hG3/A0+0=", "requires": { "deep-extend": "^0.6.0", "ini": "~1.3.0", @@ -10885,7 +10880,7 @@ "regexpp": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", - "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", + "integrity": "sha1-jRnTHPYySCtYkEn4KB+T28uk0H8=", "dev": true }, "registry-auth-token": { @@ -11240,7 +11235,7 @@ "semver-regex": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/semver-regex/-/semver-regex-2.0.0.tgz", - "integrity": "sha512-mUdIBBvdn0PLOeP3TEkMH7HHeUP3GjsXCwKarjv/kGmUFOYg1VqEemKhoQpWMu6X2I8kHeuVdGibLGkVK+/5Qw==", + "integrity": "sha1-qTwsWERTmncCMzeRB7OMe0rJ0zg=", "dev": true }, "semver-utils": { @@ -11340,7 +11335,7 @@ "signale": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/signale/-/signale-1.4.0.tgz", - "integrity": "sha512-iuh+gPf28RkltuJC7W5MRi6XAjTDCAPC/prJUpQoG4vIP3MJZ+GTydVnodXA7pwvTKb2cA0m9OFZW/cdWy/I/w==", + "integrity": "sha1-xL5YMC+wJirAD8PYhqfBE3WQQvE=", "dev": true, "requires": { "chalk": "^2.3.2", @@ -11362,7 +11357,7 @@ "slice-ansi": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", - "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", + "integrity": "sha1-ys12k0YaY3pXiNkqfdT7oGjoFjY=", "dev": true, "requires": { "ansi-styles": "^3.2.0", @@ -12239,7 +12234,7 @@ "spdx-correct": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", - "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", + "integrity": "sha1-+4PlBERSaPFUsHTiGMh8ADzTHfQ=", "requires": { "spdx-expression-parse": "^3.0.0", "spdx-license-ids": "^3.0.0" @@ -12248,12 +12243,12 @@ "spdx-exceptions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", - "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==" + "integrity": "sha1-LqRQrudPKom/uUUZwH/Nb0EyKXc=" }, "spdx-expression-parse": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", - "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "integrity": "sha1-meEZt6XaAOBUkcn6M4t5BII7QdA=", "requires": { "spdx-exceptions": "^2.1.0", "spdx-license-ids": "^3.0.0" @@ -12267,7 +12262,7 @@ "split": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/split/-/split-1.0.1.tgz", - "integrity": "sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg==", + "integrity": "sha1-YFvZvjA6pZ+zX5Ip++oN3snqB9k=", "dev": true, "requires": { "through": "2" @@ -12285,7 +12280,7 @@ "split2": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/split2/-/split2-2.2.0.tgz", - "integrity": "sha512-RAb22TG39LhI31MbreBgIuKiIKhVsawfTgEGqKHTK87aG+ul/PB8Sqoi3I7kVdRWiCfrKxK3uo4/YUkpNvhPbw==", + "integrity": "sha1-GGsldbz4PoW30YRldWI47k7kJJM=", "dev": true, "requires": { "through2": "^2.0.2" @@ -12357,7 +12352,7 @@ "string-argv": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.0.tgz", - "integrity": "sha512-NGZHq3nkSXVtGZXTBjFru3MNfoZyIzN25T7BmvdgnSC0LCJczAGLLMQLyjywSIaAoqSemgLzBRHOsnrHbt60+Q==", + "integrity": "sha1-Dqmeclf+pel6G/zfwZzxLWjm7Go=", "dev": true }, "string-width": { @@ -12380,7 +12375,7 @@ "stringify-object": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/stringify-object/-/stringify-object-3.3.0.tgz", - "integrity": "sha512-rHqiFh1elqCQ9WPLIC8I0Q/g/wj5J1eMkyoiD6eoQApWHP0FtlK7rqnhmabL5VUY9JQCcqwwvlOaSuutekgyrw==", + "integrity": "sha1-cDBlrvyhkwDTzoivT1s5VtdVZik=", "dev": true, "requires": { "get-own-enumerable-property-symbols": "^3.0.0", @@ -12410,7 +12405,7 @@ "strip-final-newline": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", - "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "integrity": "sha1-ibhS+y/L6Tb29LMYevsKEsGrWK0=", "dev": true }, "strip-indent": { @@ -12435,7 +12430,7 @@ "supports-hyperlinks": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-1.0.1.tgz", - "integrity": "sha512-HHi5kVSefKaJkGYXbDuKbUGRVxqnWGn3J2e39CYcNJEfWciGq2zYtOhXLTlvrOZW1QU7VX67w7fMmWafHX9Pfw==", + "integrity": "sha1-cdrt82zBBgrFEAw1G7PaSMKcDvc=", "dev": true, "requires": { "has-flag": "^2.0.0", @@ -12453,7 +12448,7 @@ "symbol-observable": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.2.0.tgz", - "integrity": "sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==", + "integrity": "sha1-wiaIrtTqs83C3+rLtWFmBWCgCAQ=", "dev": true }, "table": { @@ -12595,7 +12590,7 @@ "text-extensions": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-1.9.0.tgz", - "integrity": "sha512-wiBrwC1EhBelW12Zy26JeOUkQ5mRu+5o8rpsJk5+2t+Y5vE7e842qtZDQ2g1NpX/29HdyFeJ4nSIhI47ENSxlQ==", + "integrity": "sha1-GFPkX+45yUXOb2w2stZZtaq8KiY=", "dev": true }, "text-table": { @@ -12620,7 +12615,7 @@ "through2": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "integrity": "sha1-AcHjnrMdB8t9A6lqcIIyYLIxMs0=", "requires": { "readable-stream": "~2.3.6", "xtend": "~4.0.1" @@ -12904,7 +12899,6 @@ "version": "4.2.2", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", - "dev": true, "requires": { "punycode": "^2.1.0" } @@ -12965,7 +12959,7 @@ "validate-npm-package-license": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "integrity": "sha1-/JH2uce6FchX9MssXe/uw51PQQo=", "requires": { "spdx-correct": "^3.0.0", "spdx-expression-parse": "^3.0.0" @@ -13083,7 +13077,7 @@ "write": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", - "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", + "integrity": "sha1-CADhRSO5I6OH5BUSPIZWFqrg9cM=", "dev": true, "requires": { "mkdirp": "^0.5.1" @@ -13136,7 +13130,7 @@ "y18n": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==" + "integrity": "sha1-le+U+F7MgdAHwmThkKEg8KPIVms=" }, "yallist": { "version": "3.0.3", diff --git a/package.json b/package.json index 37efb602..866e7ed4 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ }, "dependencies": { "@adobe/helix-log": "^1.2.0", + "ajv": "^6.10.2", "bluebird": "^3.5.5", "ejs": "^2.6.2", "github-slugger": "^1.2.1", diff --git a/spec/examples/abstract.schema.md b/spec/examples/abstract.schema.md index 3edb5540..b00f7744 100644 --- a/spec/examples/abstract.schema.md +++ b/spec/examples/abstract.schema.md @@ -32,6 +32,8 @@ A unique identifier given to every addressable thing. - is optional - type: `string` - defined in this schema +- version: 1.0.0 +- testProperty: test ### bar Type @@ -46,6 +48,8 @@ A unique identifier given to every addressable thing. - is optional - type: `string` - defined in this schema +- version: 1.0.0 +- testProperty: test ### foo Type @@ -60,6 +64,8 @@ This is not foo. - is optional - type: `const` - defined in this schema +- version: 1.0.0 +- testProperty: test The value of this property **must** be equal to: diff --git a/spec/examples/arrays.schema.md b/spec/examples/arrays.schema.md index 1e71ec8c..8abcd919 100644 --- a/spec/examples/arrays.schema.md +++ b/spec/examples/arrays.schema.md @@ -39,6 +39,8 @@ An array of simple objects - is optional - type: `array` - defined in this schema +- version: 1.0.0 +- testProperty: test ### JoinTypelist Type @@ -64,6 +66,8 @@ A simple string. - is optional - type: `string` +- version: 1.0.0 +- testProperty: test ##### foo Type @@ -91,6 +95,8 @@ A simple string. - is optional - type: `string` +- version: 1.0.0 +- testProperty: test ##### bar Type @@ -112,6 +118,8 @@ This is an array - type: `boolean[]` - at least `1` items in the array - defined in this schema +- version: 1.0.0 +- testProperty: test ### boollist Type @@ -129,6 +137,8 @@ This is an array of coordinates in three-dimensional space. - type: `number[][]` (nested array) - no more than `10` items in the array - defined in this schema +- version: 1.0.0 +- testProperty: test ### coordinatelist Type @@ -151,6 +161,8 @@ This is an array - type: `integer[]` - between `1` and `10` items in the array - defined in this schema +- version: 1.0.0 +- testProperty: test ### intlist Type @@ -167,6 +179,8 @@ This is an array - is optional - type: `string[]` - defined in this schema +- version: 1.0.0 +- testProperty: test ### list Type @@ -183,6 +197,8 @@ This is an array of arrays - is optional - type: `array[]` (nested array) - defined in this schema +- version: 1.0.0 +- testProperty: test ### listlist Type @@ -198,6 +214,8 @@ This is an array - type: `number[]` - no more than `10` items in the array - defined in this schema +- version: 1.0.0 +- testProperty: test ### numlist Type @@ -216,6 +234,8 @@ An array of simple objects - is optional - type: `object[]` - defined in this schema +- version: 1.0.0 +- testProperty: test ### objectlist Type @@ -236,6 +256,8 @@ The a property - is **required** - type: `string` +- version: 1.0.0 +- testProperty: test ##### a Type @@ -249,6 +271,8 @@ The b property - is optional - type: `integer` +- version: 1.0.0 +- testProperty: test ##### b Type @@ -263,6 +287,8 @@ This is an array of arrays of strings - is optional - type: `string[][]` (nested array) - defined in this schema +- version: 1.0.0 +- testProperty: test ### stringlistlist Type diff --git a/spec/examples/complex.schema.md b/spec/examples/complex.schema.md index 0c694a00..2edf11c3 100644 --- a/spec/examples/complex.schema.md +++ b/spec/examples/complex.schema.md @@ -46,6 +46,8 @@ Number in a range - is optional - type: complex - defined in this schema +- version: 1.0.0 +- testProperty: test ### and Type @@ -72,6 +74,8 @@ String or number… - is optional - type: complex - defined in this schema +- version: 1.0.0 +- testProperty: test ### or Type @@ -94,6 +98,8 @@ String or number… - is **required** - type: `object` - defined in this schema +- version: 1.0.0 +- testProperty: test ### refabstract Type @@ -112,6 +118,8 @@ A unique identifier given to every addressable thing. - is optional - type: `string` +- version: 1.0.0 +- testProperty: test ##### foo Type @@ -125,6 +133,8 @@ This is not foo. - is optional - type: `const` +- version: 1.0.0 +- testProperty: test The value of this property **must** be equal to: @@ -139,6 +149,8 @@ false - is optional - type: Simple - defined in this schema +- version: 1.0.0 +- testProperty: test ### reflist Type @@ -155,6 +167,8 @@ All items must be of the type: - is optional - type: Simple - defined in this schema +- version: 1.0.0 +- testProperty: test ### refnamed Type @@ -167,6 +181,8 @@ All items must be of the type: - is optional - type: `object` - defined in this schema +- version: 1.0.0 +- testProperty: test ### refnestedobj Type @@ -182,6 +198,8 @@ All items must be of the type: - is optional - type: `object` +- version: 1.0.0 +- testProperty: test ##### refobj Type @@ -197,6 +215,8 @@ All items must be of the type: - is optional - type: Simple +- version: 1.0.0 +- testProperty: test ##### foo Type @@ -209,6 +229,8 @@ All items must be of the type: - is optional - type: `object` - defined in this schema +- version: 1.0.0 +- testProperty: test ### refobj Type @@ -224,6 +246,8 @@ All items must be of the type: - is optional - type: Simple +- version: 1.0.0 +- testProperty: test ##### foo Type @@ -238,6 +262,8 @@ Exclusive choice. - is optional - type: complex - defined in this schema +- version: 1.0.0 +- testProperty: test ### xor Type @@ -264,6 +290,8 @@ Applies to all properties that match the regular expression `int.*` - is a property pattern - type: `integer` - defined in this schema +- version: 1.0.0 +- testProperty: test ### Pattern int.\* Type @@ -278,6 +306,8 @@ Applies to all properties that match the regular expression `str.*` - is a property pattern - type: `string` - defined in this schema +- version: 1.0.0 +- testProperty: test ### Pattern str.\* Type diff --git a/spec/examples/constants.schema.md b/spec/examples/constants.schema.md index d7cc1f38..3a3a3949 100644 --- a/spec/examples/constants.schema.md +++ b/spec/examples/constants.schema.md @@ -31,6 +31,8 @@ A simple string, without strong constraints. - is **required** - type: `const` - defined in this schema +- version: 1.0.0 +- testProperty: test The value of this property **must** be equal to: diff --git a/spec/examples/custom.schema.md b/spec/examples/custom.schema.md index 7ad397bf..9e2f19aa 100644 --- a/spec/examples/custom.schema.md +++ b/spec/examples/custom.schema.md @@ -33,6 +33,8 @@ A unique identifier given to every addressable thing. - is optional - type: `string` - defined in this schema +- version: 1.0.0 +- testProperty: test ### bar Type @@ -47,6 +49,8 @@ A unique identifier given to every addressable thing. - is optional - type: `string` - defined in this schema +- version: 1.0.0 +- testProperty: test ### foo Type diff --git a/spec/examples/deepextending.schema.md b/spec/examples/deepextending.schema.md index 4476f0f5..6d61a057 100644 --- a/spec/examples/deepextending.schema.md +++ b/spec/examples/deepextending.schema.md @@ -43,6 +43,8 @@ An `id` with an `@` in front of it. The `@` stands for "dot com" - is optional - type: `string` - defined in [Definitions](definitions.schema.md#id) +- version: 1.0.0 +- testProperty: test ### @id Type @@ -59,6 +61,8 @@ A horse walks into it. - is optional - type: `string` - defined in [Extensible](extensible.schema.md#bar) +- version: 1.0.0 +- testProperty: test ### bar Type @@ -85,6 +89,8 @@ This property has a unique name to demonstrate it's uniqueness. - is optional - type: `string` - defined in [Extending](extending.schema.md#baz) +- version: 1.0.0 +- testProperty: test ### baz Type @@ -105,6 +111,8 @@ A unique identifier given to every addressable thing. - is optional - type: `string` - defined in this schema +- version: 1.0.0 +- testProperty: test ### hey Type @@ -119,6 +127,8 @@ A unique identifier given to every addressable thing. - is optional - type: `string` - defined in [Definitions](definitions.schema.md#id-1) +- version: 1.0.0 +- testProperty: test ### id Type @@ -135,6 +145,8 @@ An about ids. It is meta. If you are confused, send an email to the address spec - is optional - type: `string` - defined in [Definitions](definitions.schema.md#metaid) +- version: 1.0.0 +- testProperty: test ### meta:id Type diff --git a/spec/examples/definitions.schema.md b/spec/examples/definitions.schema.md index e5925eba..8a6355a5 100644 --- a/spec/examples/definitions.schema.md +++ b/spec/examples/definitions.schema.md @@ -49,6 +49,8 @@ An `id` with an `@` in front of it. The `@` stands for "dot com" - is **required** - type: `string` - defined in this schema +- version: 1.0.0 +- testProperty: test ### @id Type @@ -65,6 +67,8 @@ A unique identifier given to every addressable thing. - is **required** - type: `string` - defined in this schema +- version: 1.0.0 +- testProperty: test ### id Type @@ -81,6 +85,8 @@ An about ids. It is meta. If you are confused, send an email to the address spec - is optional - type: `string` - defined in this schema +- version: 1.0.0 +- testProperty: test ### meta:id Type diff --git a/spec/examples/enums.schema.md b/spec/examples/enums.schema.md index cc0bd845..b10c8067 100644 --- a/spec/examples/enums.schema.md +++ b/spec/examples/enums.schema.md @@ -32,6 +32,8 @@ A simple string. Pick a value. - is **required** - type: `enum` - defined in this schema +- version: 1.0.0 +- testProperty: test The value of this property **must** be equal to one of the [known values below](#hello-known-values). @@ -53,6 +55,8 @@ This is an example schema with examples for properties of nested objects with en - is optional - type: `object` - defined in this schema +- version: 1.0.0 +- testProperty: test ### nested Type @@ -70,6 +74,8 @@ A simple string. Pick a value. - is optional - type: `enum` +- version: 1.0.0 +- testProperty: test The value of this property **must** be equal to one of the [known values below](#nested-known-values). diff --git a/spec/examples/example.schema.md b/spec/examples/example.schema.md index c48808d4..69bec026 100644 --- a/spec/examples/example.schema.md +++ b/spec/examples/example.schema.md @@ -41,6 +41,8 @@ A simple string. - is optional - type: `string` - defined in this schema +- version: 1.0.0 +- testProperty: test ### bar Type @@ -65,6 +67,8 @@ A simple string. - is optional - type: `string` - defined in this schema +- version: 1.0.0 +- testProperty: test ### foo Type diff --git a/spec/examples/examples.schema.md b/spec/examples/examples.schema.md index bda1820c..1a52bb87 100644 --- a/spec/examples/examples.schema.md +++ b/spec/examples/examples.schema.md @@ -48,6 +48,8 @@ A simple string. - is **required** - type: `string` - defined in this schema +- version: 1.0.0 +- testProperty: test ### bar Type @@ -72,6 +74,8 @@ A simple string. - is optional - type: `string` - defined in this schema +- version: 1.0.0 +- testProperty: test ### foo Type diff --git a/spec/examples/extending.schema.md b/spec/examples/extending.schema.md index 1e2d9c97..58add686 100644 --- a/spec/examples/extending.schema.md +++ b/spec/examples/extending.schema.md @@ -41,6 +41,8 @@ An `id` with an `@` in front of it. The `@` stands for "dot com" - is optional - type: `string` - defined in [Definitions](definitions.schema.md#id) +- version: 1.0.0 +- testProperty: test ### @id Type @@ -57,6 +59,8 @@ A horse walks into it. - is optional - type: `string` - defined in [Extensible](extensible.schema.md#bar) +- version: 1.0.0 +- testProperty: test ### bar Type @@ -83,6 +87,8 @@ This property has a unique name to demonstrate it's uniqueness. - is optional - type: `string` - defined in this schema +- version: 1.0.0 +- testProperty: test ### baz Type @@ -103,6 +109,8 @@ A unique identifier given to every addressable thing. - is optional - type: `string` - defined in [Definitions](definitions.schema.md#id-1) +- version: 1.0.0 +- testProperty: test ### id Type @@ -119,6 +127,8 @@ An about ids. It is meta. If you are confused, send an email to the address spec - is optional - type: `string` - defined in [Definitions](definitions.schema.md#metaid) +- version: 1.0.0 +- testProperty: test ### meta:id Type diff --git a/spec/examples/extensible.schema.md b/spec/examples/extensible.schema.md index 4f67832f..183638fa 100644 --- a/spec/examples/extensible.schema.md +++ b/spec/examples/extensible.schema.md @@ -31,6 +31,8 @@ A horse walks into it. - is optional - type: `string` - defined in this schema +- version: 1.0.0 +- testProperty: test ### bar Type @@ -55,6 +57,8 @@ A unique identifier given to every addressable thing. - is optional - type: `string` - defined in this schema +- version: 1.0.0 +- testProperty: test ### foo Type diff --git a/spec/examples/identifiable.schema.md b/spec/examples/identifiable.schema.md index 86936b1c..81b4636b 100644 --- a/spec/examples/identifiable.schema.md +++ b/spec/examples/identifiable.schema.md @@ -31,6 +31,8 @@ A unique identifier given to every addressable thing. - is optional - type: `string` - defined in this schema +- version: 1.0.0 +- testProperty: test ### @id Type diff --git a/spec/examples/join.schema.md b/spec/examples/join.schema.md index 390aaa4e..a62b795c 100644 --- a/spec/examples/join.schema.md +++ b/spec/examples/join.schema.md @@ -33,6 +33,8 @@ A simple string. - is optional - type: `string` +- version: 1.0.0 +- testProperty: test ##### foo Type @@ -60,6 +62,8 @@ A simple string. - is optional - type: `string` +- version: 1.0.0 +- testProperty: test ##### bar Type diff --git a/spec/examples/nestedobj.schema.md b/spec/examples/nestedobj.schema.md index 9276d2c7..6758908d 100644 --- a/spec/examples/nestedobj.schema.md +++ b/spec/examples/nestedobj.schema.md @@ -28,6 +28,8 @@ settings - is optional - type: `object` - defined in this schema +- version: 1.0.0 +- testProperty: test ### settings Type @@ -45,6 +47,8 @@ collaborators - is optional - type: `object` +- version: 1.0.0 +- testProperty: test ##### collaborators Type @@ -60,6 +64,8 @@ collaborators - is optional - type: `string` +- version: 1.0.0 +- testProperty: test ##### id Type diff --git a/spec/examples/pattern.schema.md b/spec/examples/pattern.schema.md index 0e055c24..8bbdf63f 100644 --- a/spec/examples/pattern.schema.md +++ b/spec/examples/pattern.schema.md @@ -26,6 +26,8 @@ A simple string. - is a property pattern - type: `string` - defined in this schema +- version: 1.0.0 +- testProperty: test ### Pattern [0-9] Type diff --git a/spec/examples/simple.schema.md b/spec/examples/simple.schema.md index 1642f173..ecf4abd6 100644 --- a/spec/examples/simple.schema.md +++ b/spec/examples/simple.schema.md @@ -31,6 +31,8 @@ A unique identifier given to every addressable thing. - is optional - type: `string` - defined in this schema +- version: 1.0.0 +- testProperty: test ### id Type diff --git a/spec/examples/simpletypes.schema.md b/spec/examples/simpletypes.schema.md index c6b99c91..9eee5818 100644 --- a/spec/examples/simpletypes.schema.md +++ b/spec/examples/simpletypes.schema.md @@ -47,6 +47,8 @@ Guess what number is valid - is optional - type: `integer` - defined in this schema +- version: 1.0.0 +- testProperty: test ### integer_threes Type @@ -65,6 +67,8 @@ Just a whole number. I don't like fractions. Don't get too small - is optional - type: `integer` - defined in this schema +- version: 1.0.0 +- testProperty: test ### interger_constrained Type @@ -81,6 +85,8 @@ Just a whole number. I don't like fractions. - is optional - type: `integer` - defined in this schema +- version: 1.0.0 +- testProperty: test ### interger_unconstrained Type @@ -95,6 +101,8 @@ Just a number. Don't get too big. - is optional - type: `number` - defined in this schema +- version: 1.0.0 +- testProperty: test ### number_constrained Type @@ -111,6 +119,8 @@ Just a number - is optional - type: `number` - defined in this schema +- version: 1.0.0 +- testProperty: test ### number_unconstrained Type @@ -125,6 +135,8 @@ A date-like string. - is optional - type: `string` - defined in this schema +- version: 1.0.0 +- testProperty: test ### string_date Type @@ -141,6 +153,8 @@ An email-like string. - is optional - type: `string` - defined in this schema +- version: 1.0.0 +- testProperty: test ### string_email Type @@ -157,6 +171,8 @@ A hostname-like string. - is optional - type: `string` - defined in this schema +- version: 1.0.0 +- testProperty: test ### string_hostname Type @@ -173,6 +189,8 @@ An IPv4-like string. - is optional - type: `string` - defined in this schema +- version: 1.0.0 +- testProperty: test ### string_ipv4 Type @@ -189,6 +207,8 @@ An IPv6-like string. - is optional - type: `string` - defined in this schema +- version: 1.0.0 +- testProperty: test ### string_ipv6 Type @@ -205,6 +225,8 @@ A string with minumum and maximum length - is optional - type: `string` - defined in this schema +- version: 1.0.0 +- testProperty: test ### string_length Type @@ -232,6 +254,8 @@ A string following a regular expression - is optional - type: `string` - defined in this schema +- version: 1.0.0 +- testProperty: test ### string_pattern Type @@ -285,6 +309,8 @@ A string following a regular expression - is optional - type: `string` - defined in this schema +- version: 1.0.0 +- testProperty: test ### string_pattern_noexample Type @@ -305,6 +331,8 @@ A string following a regular expression - is optional - type: `string` - defined in this schema +- version: 1.0.0 +- testProperty: test ### string_pattern_singleexample Type @@ -333,6 +361,8 @@ A simple string, without any constraints. - is optional - type: `string` - defined in this schema +- version: 1.0.0 +- testProperty: test ### string_unconstrained Type @@ -353,6 +383,8 @@ A URI. - is optional - type: `string` - defined in this schema +- version: 1.0.0 +- testProperty: test ### string_uri Type @@ -367,6 +399,8 @@ A URI. - is **required** - type: `boolean` - defined in this schema +- version: 1.0.0 +- testProperty: test ### yesno Type diff --git a/spec/examples/stabilizing.schema.md b/spec/examples/stabilizing.schema.md index debee5e6..98478940 100644 --- a/spec/examples/stabilizing.schema.md +++ b/spec/examples/stabilizing.schema.md @@ -31,6 +31,8 @@ A unique identifier given to every addressable thing. - is optional - type: `string` - defined in this schema +- version: 1.0.0 +- testProperty: test ### id Type diff --git a/spec/examples/subdir/subdir.schema.md b/spec/examples/subdir/subdir.schema.md index 12e18684..9a48a506 100644 --- a/spec/examples/subdir/subdir.schema.md +++ b/spec/examples/subdir/subdir.schema.md @@ -31,6 +31,8 @@ A unique identifier given to every addressable thing. - is optional - type: `string` - defined in this schema +- version: 1.0.0 +- testProperty: test ### id Type diff --git a/spec/examples/typearrays.schema.md b/spec/examples/typearrays.schema.md index ff0c4a42..a5974b4e 100644 --- a/spec/examples/typearrays.schema.md +++ b/spec/examples/typearrays.schema.md @@ -34,6 +34,8 @@ This is just nothing - is optional - type: `null` - defined in this schema +- version: 1.0.0 +- testProperty: test ### null Type @@ -48,6 +50,8 @@ Nullable string - is optional - type: `string` - defined in this schema +- version: 1.0.0 +- testProperty: test ### string-or-null Type @@ -62,6 +66,8 @@ Types can be many things - is optional - type: multiple - defined in this schema +- version: 1.0.0 +- testProperty: test ### string-or-number Type @@ -79,6 +85,8 @@ Types can be many things, even nothing at all. - is optional - type: multiple - defined in this schema +- version: 1.0.0 +- testProperty: test ### string-or-number-null Type diff --git a/spec/lib/integrationTest.spec.js b/spec/lib/integrationTest.spec.js index 9be1e277..c9bdddb7 100644 --- a/spec/lib/integrationTest.spec.js +++ b/spec/lib/integrationTest.spec.js @@ -66,6 +66,7 @@ describe('Compare results', () => { '--link-status', 'status.md', '-v', '06', + '-p', 'version,testProperty', ]); ls.on('close', (code) => { expect(code).toEqual(0); diff --git a/templates/md/array-type.ejs b/templates/md/array-type.ejs index 8c028a6c..36cf3c9d 100644 --- a/templates/md/array-type.ejs +++ b/templates/md/array-type.ejs @@ -19,11 +19,11 @@ if (schema.items.type==="string") { %><% } else if (schema.items.type==="boolean") { %><%- include("boolean-type",{schema:schema.items,_:_, i18n:i18n}) %><% } else if (schema.items.type==="object") { - %><%- include("object-type",{schema:schema.items,_:_, i18n:i18n}) + %><%- include("object-type",{schema:schema.items,_:_, i18n:i18n, customElements:customElements}) %><% } else if (schema.items.type==="array") { - %><%- include("array-type",{schema:schema.items,_:_, nested:true, i18n:i18n}) + %><%- include("array-type",{schema:schema.items,_:_, nested:true, i18n:i18n, customElements:customElements}) %><% } else if (schema.items.anyOf!==undefined || schema.items.allOf!==undefined || schema.items.oneOf!==undefined) { - %><%- include("join-type",{schema:schema.items,_:_,schemas:schema.items.anyOf || schema.items.allOf || schema.items.oneOf, ejs:ejs, i18n:i18n}) %> + %><%- include("join-type",{schema:schema.items,_:_,schemas:schema.items.anyOf || schema.items.allOf || schema.items.oneOf, ejs:ejs, i18n:i18n, customElements:customElements}) %> %><% } else if (schema.items.$ref!==undefined) { %><%- include("referenced-type",{schema:schema.items,_:_, i18n:i18n}) %> <% } else { %> diff --git a/templates/md/join-type.ejs b/templates/md/join-type.ejs index 0d387389..ddfe25ce 100644 --- a/templates/md/join-type.ejs +++ b/templates/md/join-type.ejs @@ -30,13 +30,13 @@ <% } else if (schemas[i].type==="boolean") { %> <%- include("boolean-type",{schema:schemas[i],_:_,i18n:i18n}) %> <% } else if (schemas[i].type==="array") { %> -<%- include("array-type",{schema:schemas[i],_:_,nested:false,ejs:ejs,i18n:i18n}) %> +<%- include("array-type",{schema:schemas[i],_:_,nested:false,ejs:ejs,i18n:i18n, customElements:customElements}) %> <% } else if (schemas[i].type==="object") { %> -<%- include("object-type",{schema:schemas[i],_:_, nameSlug:_,i18n:i18n}) %> +<%- include("object-type",{schema:schemas[i],_:_, nameSlug:_,i18n:i18n, customElements:customElements}) %> <% } else if (schemas[i].$ref!==undefined) { %> <%- include("referenced-type",{schema:schemas[i],_:_,i18n:i18n}) %> <% } else if (schemas[i].anyOf!==undefined||schemas[i].allOf!==undefined) { %> -<%- include("join-type",{schema:schemas[i],_:_,schemas:schemas[i].anyOf || schemas[i].allOf ,ejs:ejs,i18n:i18n}) %> +<%- include("join-type",{schema:schemas[i],_:_,schemas:schemas[i].anyOf || schemas[i].allOf ,ejs:ejs,i18n:i18n, customElements:customElements}) %> <% } else { %> <% } %> <% } %> diff --git a/templates/md/nested-property.ejs b/templates/md/nested-property.ejs index e2457214..d67123d6 100644 --- a/templates/md/nested-property.ejs +++ b/templates/md/nested-property.ejs @@ -28,7 +28,8 @@ else if (schema.minItems!==undefined ) { %>* <%=i18n <% } %><% if (schema.default!==undefined) { %> * <%=i18n.__('nestedPropertySchemaDefault')%> `<%- JSON.stringify(schema.default) %>` <% } %> - +<% customElements.forEach(property => { %> * <%=property%>: <%=schema[property] %> +<% });%> <% if (schema.const!==undefined) { %> <%=i18n.__('nestedPropertySchemaConst')%> @@ -50,13 +51,13 @@ else if (schema.minItems!==undefined ) { %>* <%=i18n <% } else if (schema.type==="boolean") { %> <%- include("boolean-type",{schema:schema,_:_,i18n:i18n}) %> <% } else if (schema.type==="object") { %> -<%- include("object-type",{schema:schema,_:_,i18n:i18n}) %> +<%- include("object-type",{schema:schema,_:_,i18n:i18n, customElements:customElements}) %> <% } else if (schema.type==="array") { %> -<%- include("array-type",{schema:schema,_:_,nested:false,ejs:ejs,i18n:i18n}) %> +<%- include("array-type",{schema:schema,_:_,nested:false,ejs:ejs,i18n:i18n, customElements:customElements}) %> <% } else if (schema.$ref!==undefined) { %> <%- include("referenced-type",{schema:schema,_:_}) %> <% } else if (schema.anyOf!==undefined || schema.allOf!==undefined || schema.oneOf!==undefined) { %> -<%- include("join-type",{schema:schema,_:_,schemas:schema.anyOf || schema.allOf || schema.oneOf,ejs:ejs,i18n:i18n}) %> +<%- include("join-type",{schema:schema,_:_,schemas:schema.anyOf || schema.allOf || schema.oneOf,ejs:ejs,i18n:i18n, customElements:customElements}) %> <% } else { %> <%=i18n.__('nestedPropertyUnknownType')%> `<%= schema.type %>`. diff --git a/templates/md/object-type.ejs b/templates/md/object-type.ejs index 08c64123..7324114a 100644 --- a/templates/md/object-type.ejs +++ b/templates/md/object-type.ejs @@ -22,7 +22,8 @@ required: required, examples: inner.examples, nameSlug:nameSlug, - i18n:i18n + i18n:i18n, + customElements:customElements }) %> <% diff --git a/templates/md/pattern-property.ejs b/templates/md/pattern-property.ejs index 9e2a241b..82abc04f 100644 --- a/templates/md/pattern-property.ejs +++ b/templates/md/pattern-property.ejs @@ -27,7 +27,8 @@ else if (schema.minItems!==undefined ) { %>* <%=i18n * <%=i18n.__('patternPropertySchemaDefault')%> `<%- JSON.stringify(schema.default) %>` <% } %> * <%=i18n.__('patternPropertySchemaDefinedIn')%> <% if (schema.$oSchema) { %>[<%= schema.$oSchema.$linkVal %>](<%= schema.$oSchema.$linkPath %>#<%= name %>)<% } else { %><%=i18n.__('patternPropertySchemaDefinedSelf')%><% } %> - +<% customElements.forEach(property => { %> * <%=property%>: <%=schema[property] %> +<% });%> <% if (schema.const!==undefined) { %> <%=i18n.__('patternPropertySchemaConst')%> @@ -49,11 +50,11 @@ else if (schema.minItems!==undefined ) { %>* <%=i18n <% } else if (schema.type==="boolean") { %> <%- include("boolean-type",{schema:schema,_:_,i18n:i18n}) %> <% } else if (schema.type==="array") { %> -<%- include("array-type",{schema:schema,_:_,nested:false,ejs:ejs,i18n:i18n}) %> +<%- include("array-type",{schema:schema,_:_,nested:false,ejs:ejs,i18n:i18n, customElements:customElements}) %> <% } else if (schema.$ref!==undefined) { %> <%- include("referenced-type",{schema:schema,_:_,i18n:i18n}) %> <% } else if (schema.anyOf!==undefined || schema.allOf!==undefined || schema.oneOf!==undefined) { %> -<%- include("join-type",{schema:schema,_:_,schemas:schema.anyOf || schema.allOf || schema.oneOf,ejs:ejs,i18n:i18n}) %> +<%- include("join-type",{schema:schema,_:_,schemas:schema.anyOf || schema.allOf || schema.oneOf,ejs:ejs,i18n:i18n, customElements:customElements}) %> <% } else { %> <%=i18n.__('patternPropertyUnknownType')%> `<%= schema.type %>`. diff --git a/templates/md/property.ejs b/templates/md/property.ejs index 3bbc8cec..2d1575b7 100644 --- a/templates/md/property.ejs +++ b/templates/md/property.ejs @@ -31,6 +31,8 @@ * <%=i18n.__('propertySchemaDefault')%>: `<%- JSON.stringify(schema.default) %>` <% } -%> * <%=i18n.__('propertySchemaDefinedIn')%> <% if (schema.$oSchema) { %>[<%= schema.$oSchema.$linkVal %>](<%= schema.$oSchema.$linkPath %>#<%= nameSlug %>)<% } else { %><%=i18n.__('propertySchemaDefinedSelf')%><% } %> +<% customElements.forEach(property => { %> * <%=property%>: <%=schema[property] %> +<% });%> <% if (schema.const!==undefined) { %> <%=i18n.__('propertySchemaConst')%> @@ -56,13 +58,13 @@ <% } else if (schema.type==="boolean") { %> <%- include("boolean-type",{schema:schema,_:_,i18n:i18n}) %> <% } else if (schema.type==="object") { %> -<%- include("object-type",{schema:schema,_:_,nameSlug:nameSlug,i18n:i18n}) %> +<%- include("object-type",{schema:schema,_:_,nameSlug:nameSlug,i18n:i18n, customElements:customElements}) %> <% } else if (schema.type==="array") { %> -<%- include("array-type",{schema:schema,_:_,nested:false,ejs:ejs,i18n:i18n}) %> +<%- include("array-type",{schema:schema,_:_,nested:false,ejs:ejs,i18n:i18n, customElements:customElements}) %> <% } else if (schema.$ref!==undefined) { %> <%- include("referenced-type",{schema:schema,_:_,i18n:i18n}) %> <% } else if (schema.anyOf!==undefined || schema.allOf!==undefined || schema.oneOf!==undefined) { %> -<%- include("join-type",{schema:schema,_:_,schemas:schema.anyOf || schema.allOf || schema.oneOf,ejs:ejs,i18n:i18n}) %> +<%- include("join-type",{schema:schema,_:_,schemas:schema.anyOf || schema.allOf || schema.oneOf,ejs:ejs,i18n:i18n, customElements:customElements}) %> <% } else if (schema.simpletype==="multiple") { %> <%- include("multiple-type",{schema:schema,_:_,i18n:i18n}) %> <% } else { %>