From 6c574b665b25bda9eaaee985f666a71cd90770b3 Mon Sep 17 00:00:00 2001
From: Lars Trieloff <trieloff@adobe.com>
Date: Thu, 14 Dec 2017 15:12:32 +0000
Subject: [PATCH] [trivial] point out nested arrays

---
 examples/docs/arrays.schema.md                  | 4 ++--
 examples/docs/examples.schema.md                | 8 ++++----
 examples/generated-schemas/examples.schema.json | 8 ++++----
 templates/md/property.ejs                       | 2 +-
 4 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/examples/docs/arrays.schema.md b/examples/docs/arrays.schema.md
index 6fa776d..ba5db9f 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 57f409e..96c2634 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 d46f1b7..2a96fb9 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 09f328b..94491a0 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<% } %>
-- 
GitLab