Skip to content
Snippets Groups Projects
Commit 6898d93b authored by Lars Trieloff's avatar Lars Trieloff
Browse files

[trivial] point out type within arrays

parent 6c574b66
Branches
Tags
No related merge requests found
......@@ -38,19 +38,14 @@ This is an array
### list Type
Unknown type `array`.
```json
{
"type": "array",
"description": "This is an array",
"items": {
"type": "string",
"simpletype": "`string`"
},
"simpletype": "`string[]`"
}
```
Array type: `string[]`.
All items must be of the type:
`string`
......@@ -68,19 +63,15 @@ This is an array of arrays
### listlist Type
Unknown type `array`.
```json
{
"type": "array",
"description": "This is an array of arrays",
"items": {
"type": "array",
"simpletype": "`array`"
},
"simpletype": "`array[]`"
}
```
Array type: `array[]`.
All items must be of the type:
Nesting alarm!
Array type: `array`.
......@@ -98,23 +89,21 @@ This is an array of arrays of strings
### stringlistlist Type
Unknown type `array`.
```json
{
"type": "array",
"description": "This is an array of arrays of strings",
"items": {
"type": "array",
"items": {
"type": "string",
"simpletype": "`string`"
},
"simpletype": "`string[]`"
},
"simpletype": "`string[][]`"
}
```
Array type: `string[][]`.
All items must be of the type:
Nesting alarm!
Array type: `string[]`.
All items must be of the type:
`string`
......@@ -132,21 +121,14 @@ This is an array
### intlist Type
Unknown type `array`.
```json
{
"type": "array",
"description": "This is an array",
"items": {
"type": "integer",
"simpletype": "`integer`"
},
"maxItems": 10,
"minItems": 1,
"simpletype": "`integer[]`"
}
```
Array type: `integer[]`.
All items must be of the type:
`integer`
......@@ -164,20 +146,12 @@ This is an array
### boollist Type
Unknown type `array`.
```json
{
"type": "array",
"description": "This is an array",
"items": {
"type": "boolean",
"simpletype": "`boolean`"
},
"minItems": 1,
"simpletype": "`boolean[]`"
}
```
Array type: `boolean[]`.
All items must be of the type:
`boolean`
......@@ -195,20 +169,14 @@ This is an array
### numlist Type
Unknown type `array`.
```json
{
"type": "array",
"description": "This is an array",
"items": {
"type": "number",
"simpletype": "`number`"
},
"maxItems": 10,
"simpletype": "`number[]`"
}
```
Array type: `number[]`.
All items must be of the type:
`number`
* minimum value: `10`
......
......@@ -56,7 +56,8 @@
"type": "array",
"description": "This is an array",
"items": {
"type": "number"
"type": "number",
"minimum": 10
},
"maxItems": 10
}
......
......@@ -56,7 +56,8 @@
"type":"array",
"description": "This is an array",
"items": {
"type": "number"
"type": "number",
"minimum": 10
},
"maxItems": 10
}
......
<% /**
* Copyright 2017 Adobe Systems Incorporated. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*/ %>
Array type: <%=schema.simpletype %>.
<% if (schema.items!==undefined) { %>
All items must be of the type:<%
if (schema.items.type==="string") {
%><%- include("string-type",{schema:schema.items,_:_})
%><% } else if (schema.items.type==="number"||schema.items.type==="integer") {
%><%- include("number-type",{schema:schema.items,_:_})
%><% } else if (schema.items.type==="boolean") {
%><%- include("boolean-type",{schema:schema.items,_:_})
%><% } else if (schema.items.type==="array") { %>
Nesting alarm!
<%- include("array-type",{schema:schema.items,_:_}) %>
<% } else { %>
Unknown type `<%= schema.type %>`.
```json
<%- JSON.stringify(schema, null, 2) %>
```
<% } %>
<% } %>
......@@ -41,6 +41,8 @@ The value of this property **must** be equal to one of the [known values below](
<%- include("number-type",{schema:schema,_:_}) %>
<% } else if (schema.type==="boolean") { %>
<%- include("boolean-type",{schema:schema,_:_}) %>
<% } else if (schema.type==="array") { %>
<%- include("array-type",{schema:schema,_:_}) %>
<% } else { %>
Unknown type `<%= schema.type %>`.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment