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

list properties of nested objects

parent 2b1b0eca
Branches
Tags
No related merge requests found
...@@ -204,30 +204,15 @@ An array of simple objects ...@@ -204,30 +204,15 @@ An array of simple objects
Array type: `object[]` Array type: `object[]`
All items must be of the type: All items must be of the type:
Unknown type `object`. `object` with following properties:
```json
{ | Property | Type | Required
"type": "array", |----------|------|----------|
"description": "An array of simple objects", | `a`| string | **Required** |
"items": { | `b`| integer | Optional |
"type": "object",
"properties": {
"a": {
"type": "string",
"description": "The a property"
},
"b": {
"type": "integer",
"description": "The b property"
}
},
"simpletype": "`object`"
},
"simpletype": "`object[]`"
}
```
full list.
......
...@@ -46,7 +46,7 @@ An `id` with an `@` in front of it. The `@` stands for "dot com" ...@@ -46,7 +46,7 @@ An `id` with an `@` in front of it. The `@` stands for "dot com"
`string` `string`
* format: `uri-reference` URI Reference (according to [RFC3986](https://tools.ietf.org/html/rfc3986)) * format: `uri-reference` URI Reference (according to [RFC3986](https://tools.ietf.org/html/rfc3986))
...@@ -141,7 +141,7 @@ A unique identifier given to every addressable thing. ...@@ -141,7 +141,7 @@ A unique identifier given to every addressable thing.
`string` `string`
* format: `uri` Uniformous Resource Identifier (according to [RFC3986](http://tools.ietf.org/html/rfc3986)) * format: `uri` Uniformous Resource Identifier (according to [RFC3986](http://tools.ietf.org/html/rfc3986))
...@@ -161,7 +161,7 @@ An about ids. It is meta. If you are confused, send an email to the address spec ...@@ -161,7 +161,7 @@ An about ids. It is meta. If you are confused, send an email to the address spec
`string` `string`
* format: `email` email address (according to [RFC 5322, section 3.4.1](https://tools.ietf.org/html/rfc5322)) * format: `email` email address (according to [RFC 5322, section 3.4.1](https://tools.ietf.org/html/rfc5322))
......
...@@ -50,7 +50,7 @@ An `id` with an `@` in front of it. The `@` stands for "dot com" ...@@ -50,7 +50,7 @@ An `id` with an `@` in front of it. The `@` stands for "dot com"
`string` `string`
* format: `uri-reference` URI Reference (according to [RFC3986](https://tools.ietf.org/html/rfc3986)) * format: `uri-reference` URI Reference (according to [RFC3986](https://tools.ietf.org/html/rfc3986))
...@@ -70,7 +70,7 @@ A unique identifier given to every addressable thing. ...@@ -70,7 +70,7 @@ A unique identifier given to every addressable thing.
`string` `string`
* format: `uri` Uniformous Resource Identifier (according to [RFC3986](http://tools.ietf.org/html/rfc3986)) * format: `uri` Uniformous Resource Identifier (according to [RFC3986](http://tools.ietf.org/html/rfc3986))
...@@ -90,7 +90,7 @@ An about ids. It is meta. If you are confused, send an email to the address spec ...@@ -90,7 +90,7 @@ An about ids. It is meta. If you are confused, send an email to the address spec
`string` `string`
* format: `email` email address (according to [RFC 5322, section 3.4.1](https://tools.ietf.org/html/rfc5322)) * format: `email` email address (according to [RFC 5322, section 3.4.1](https://tools.ietf.org/html/rfc5322))
......
...@@ -44,7 +44,7 @@ An `id` with an `@` in front of it. The `@` stands for "dot com" ...@@ -44,7 +44,7 @@ An `id` with an `@` in front of it. The `@` stands for "dot com"
`string` `string`
* format: `uri-reference` URI Reference (according to [RFC3986](https://tools.ietf.org/html/rfc3986)) * format: `uri-reference` URI Reference (according to [RFC3986](https://tools.ietf.org/html/rfc3986))
...@@ -120,7 +120,7 @@ A unique identifier given to every addressable thing. ...@@ -120,7 +120,7 @@ A unique identifier given to every addressable thing.
`string` `string`
* format: `uri` Uniformous Resource Identifier (according to [RFC3986](http://tools.ietf.org/html/rfc3986)) * format: `uri` Uniformous Resource Identifier (according to [RFC3986](http://tools.ietf.org/html/rfc3986))
...@@ -140,7 +140,7 @@ An about ids. It is meta. If you are confused, send an email to the address spec ...@@ -140,7 +140,7 @@ An about ids. It is meta. If you are confused, send an email to the address spec
`string` `string`
* format: `email` email address (according to [RFC 5322, section 3.4.1](https://tools.ietf.org/html/rfc5322)) * format: `email` email address (according to [RFC 5322, section 3.4.1](https://tools.ietf.org/html/rfc5322))
......
...@@ -34,7 +34,7 @@ A unique identifier given to every addressable thing. ...@@ -34,7 +34,7 @@ A unique identifier given to every addressable thing.
`string` `string`
* format: `uri` Uniformous Resource Identifier (according to [RFC3986](http://tools.ietf.org/html/rfc3986)) * format: `uri` Uniformous Resource Identifier (according to [RFC3986](http://tools.ietf.org/html/rfc3986))
......
...@@ -148,7 +148,7 @@ A date-like string. ...@@ -148,7 +148,7 @@ A date-like string.
`string` `string`
* format: `date-time` date and time (according to [RFC 3339, section 5.6](http://tools.ietf.org/html/rfc3339)) * format: `date-time` date and time (according to [RFC 3339, section 5.6](http://tools.ietf.org/html/rfc3339))
...@@ -168,7 +168,7 @@ An email-like string. ...@@ -168,7 +168,7 @@ An email-like string.
`string` `string`
* format: `email` email address (according to [RFC 5322, section 3.4.1](https://tools.ietf.org/html/rfc5322)) * format: `email` email address (according to [RFC 5322, section 3.4.1](https://tools.ietf.org/html/rfc5322))
...@@ -188,7 +188,7 @@ A hostname-like string. ...@@ -188,7 +188,7 @@ A hostname-like string.
`string` `string`
* format: `hostname` Domain Name (according to [RFC 1034, section 3.1](https://tools.ietf.org/html/rfc1034)) * format: `hostname` Domain Name (according to [RFC 1034, section 3.1](https://tools.ietf.org/html/rfc1034))
...@@ -208,7 +208,7 @@ An IPv4-like string. ...@@ -208,7 +208,7 @@ An IPv4-like string.
`string` `string`
* format: `ipv4` IP (v4) address (according to [RFC 2673, section 3.2](https://tools.ietf.org/html/rfc2673)) * format: `ipv4` IP (v4) address (according to [RFC 2673, section 3.2](https://tools.ietf.org/html/rfc2673))
...@@ -228,7 +228,7 @@ An IPv6-like string. ...@@ -228,7 +228,7 @@ An IPv6-like string.
`string` `string`
* format: `ipv6` IP (v6) address (according to [RFC 4291, section 2.2](https://tools.ietf.org/html/rfc4291)) * format: `ipv6` IP (v6) address (according to [RFC 4291, section 2.2](https://tools.ietf.org/html/rfc4291))
...@@ -418,7 +418,7 @@ A URI. ...@@ -418,7 +418,7 @@ A URI.
`string` `string`
* format: `uri` Uniformous Resource Identifier (according to [RFC3986](http://tools.ietf.org/html/rfc3986)) * format: `uri` Uniformous Resource Identifier (according to [RFC3986](http://tools.ietf.org/html/rfc3986))
......
...@@ -34,7 +34,7 @@ A unique identifier given to every addressable thing. ...@@ -34,7 +34,7 @@ A unique identifier given to every addressable thing.
`string` `string`
* format: `uri` Uniformous Resource Identifier (according to [RFC3986](http://tools.ietf.org/html/rfc3986)) * format: `uri` Uniformous Resource Identifier (according to [RFC3986](http://tools.ietf.org/html/rfc3986))
......
...@@ -82,6 +82,9 @@ ...@@ -82,6 +82,9 @@
"description": "An array of simple objects", "description": "An array of simple objects",
"items": { "items": {
"type": "object", "type": "object",
"required": [
"a"
],
"properties": { "properties": {
"a": { "a": {
"type": "string", "type": "string",
......
...@@ -82,6 +82,9 @@ ...@@ -82,6 +82,9 @@
"description": "An array of simple objects", "description": "An array of simple objects",
"items": { "items": {
"type": "object", "type": "object",
"required": [
"a"
],
"properties": { "properties": {
"a": { "a": {
"type": "string", "type": "string",
......
<% /**
* 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
*/ %>
| Property | Type | Required
|----------|------|----------|
<% _.keys(props).sort().forEach(property => {
const schema = props[property]; %>
| `<%= property %>`| <%= schema.type %> | <%= (outer.required&&outer.required.indexOf(property)>=0) ? "**Required**" : "Optional" %> |
<%
});
%>
\ No newline at end of file
<% /**
* Copyright 2018 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
*/ %>
`object` with following properties:
<%- include("nested-properties",{outer:schema,props: schema.properties,_:_, nested:true}) %>
full list.
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment