diff --git a/examples/docs/arrays.schema.md b/examples/docs/arrays.schema.md index 6fa776db50bb5e3d901ae913257de608d10c21ee..ba5db9f91767002c08d99b3c736f3be61dbc4175 100644 --- a/examples/docs/arrays.schema.md +++ b/examples/docs/arrays.schema.md @@ -62,7 +62,7 @@ This is an array of arrays `listlist` * is optional -* type: `array[]` +* type: `array[]` (nested array) * defined in this schema @@ -92,7 +92,7 @@ This is an array of arrays of strings `stringlistlist` * is optional -* type: `string[][]` +* type: `string[][]` (nested array) * defined in this schema diff --git a/examples/docs/examples.schema.md b/examples/docs/examples.schema.md index 57f409e244323ff47a5aa7ab6068cb422a537ad5..96c26345f5b50459173c53a60cddaba1a765dd68 100644 --- a/examples/docs/examples.schema.md +++ b/examples/docs/examples.schema.md @@ -19,15 +19,15 @@ This is an example schema with *multiple* examples. Too many examples? There can ```json { - "foo": "bi", - "bar": "bu" + "foo": "zip", + "bar": "zap" } ``` ```json { - "foo": "zip", - "bar": "zap" + "foo": "bi", + "bar": "bu" } ``` diff --git a/examples/generated-schemas/examples.schema.json b/examples/generated-schemas/examples.schema.json index d46f1b75faa238b6976eb724d9dac9893a37c599..2a96fb91e33a8f032bf79aaff87530330c870af8 100644 --- a/examples/generated-schemas/examples.schema.json +++ b/examples/generated-schemas/examples.schema.json @@ -31,13 +31,13 @@ "bar" ], "examples": [ - { - "foo": "bi", - "bar": "bu" - }, { "foo": "zip", "bar": "zap" + }, + { + "foo": "bi", + "bar": "bu" } ] } \ No newline at end of file diff --git a/templates/md/property.ejs b/templates/md/property.ejs index 09f328baf244b99eff92ad5aa2c3b7fbb4f68785..94491a0e789c7669d3cee03d3bb1958287d77500 100644 --- a/templates/md/property.ejs +++ b/templates/md/property.ejs @@ -14,7 +14,7 @@ `<%=name %>` * is <% if (required) { %>**required**<% } else { %>optional<% } %> -* type: <%=schema.simpletype %><% if (schema.type==='array') { %> +* type: <%=schema.simpletype %><% if (schema.simpletype.match(/\[\]\[\]/)||schema.simpletype==="`array[]`") { %> (nested array)<% } %><% if (schema.type==='array') { %> <% if (schema.maxItems!==undefined&&schema.minItems!==undefined) { %>* between `<%=schema.minItems %>` and `<%=schema.maxItems %>` items in the array<% } else if (schema.maxItems!==undefined ) { %>* no more than `<%=schema.maxItems %>` items in the array<% } else if (schema.minItems!==undefined ) { %>* at least `<%=schema.minItems %>` items in the array<% } %>