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

show the correct nested type, provide example for #26

parent 375c23ae
No related branches found
No related tags found
No related merge requests found
......@@ -25,6 +25,7 @@ This is an example schema with examples for multiple array types and their const
| [list](#list) | `string[]` | Optional | Arrays (this schema) |
| [listlist](#listlist) | `array[]` | Optional | Arrays (this schema) |
| [numlist](#numlist) | `number[]` | Optional | Arrays (this schema) |
| [objectlist](#objectlist) | `object[]` | Optional | Arrays (this schema) |
| [stringlistlist](#stringlistlist) | `string[][]` | Optional | Arrays (this schema) |
## boollist
......@@ -187,6 +188,53 @@ All items must be of the type:
## objectlist
An array of simple objects
`objectlist`
* is optional
* type: `object[]`
* defined in this schema
### objectlist Type
Array type: `object[]`
All items must be of the type:
Unknown type `object`.
```json
{
"type": "array",
"description": "An array of simple objects",
"items": {
"type": "object",
"properties": {
"a": {
"type": "string",
"description": "The a property"
},
"b": {
"type": "integer",
"description": "The b property"
}
},
"simpletype": "`object`"
},
"simpletype": "`object[]`"
}
```
## stringlistlist
This is an array of arrays of strings
......
......@@ -76,6 +76,23 @@
}
},
"maxItems": 10
},
"objectlist": {
"type": "array",
"description": "An array of simple objects",
"items": {
"type": "object",
"properties": {
"a": {
"type": "string",
"description": "The a property"
},
"b": {
"type": "integer",
"description": "The b property"
}
}
}
}
}
}
\ No newline at end of file
......@@ -76,6 +76,23 @@
}
},
"maxItems": 10
},
"objectlist": {
"type": "array",
"description": "An array of simple objects",
"items": {
"type": "object",
"properties": {
"a": {
"type": "string",
"description": "The a property"
},
"b": {
"type":"integer",
"description": "The b property"
}
}
}
}
}
}
......@@ -23,7 +23,7 @@ if (schema.items.type==="string") {
%><% } else if (schema.items.$ref!==undefined) {
%><%- include("referenced-type",{schema:schema.items,_:_}) %>
<% } else { %>
Unknown type `<%= schema.type %>`.
Unknown type `<%= schema.items.type %>`.
```json
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment