diff --git a/examples/docs/README.md b/examples/docs/README.md index 63125fdc544e8ca1518525127990da89c60c93ab..a5ba12c72bd1947e5d52a5e8b617e779b3675647 100644 --- a/examples/docs/README.md +++ b/examples/docs/README.md @@ -8,9 +8,10 @@ * [Abstract](./abstract.schema.md) – `https://example.com/schemas/abstract` * [Arrays](./arrays.schema.md) – `https://example.com/schemas/arrays` +* [Enumerated ](./complex.schema.md) – `https://example.com/schemas/complex` * [Constant Types](./constants.schema.md) – `https://example.com/schemas/constants` * [Custom](./custom.schema.md) – `https://example.com/schemas/custom` -* [Custom](./deepextending.schema.md) – `https://example.com/schemas/deepextending` +* [Deeply Extending](./deepextending.schema.md) – `https://example.com/schemas/deepextending` * [Definitions](./definitions.schema.md) – `https://example.com/schemas/definitions` * [Enumerated ](./enums.schema.md) – `https://example.com/schemas/enums` * [Example](./example.schema.md) – `https://example.com/schemas/example` diff --git a/examples/docs/complex.schema.md b/examples/docs/complex.schema.md new file mode 100644 index 0000000000000000000000000000000000000000..114ef9005ea2e31cff8aaa4e4bf7e4286fa78332 --- /dev/null +++ b/examples/docs/complex.schema.md @@ -0,0 +1,85 @@ +--- +template: reference +foo: bar +--- + +# Enumerated Schema + +``` +https://example.com/schemas/complex +``` + +This is an example schema that uses types defined in other schemas. + +| Abstract | Extensible | Custom Properties | Defined In | +|----------|------------|-------------------|------------| +| Can be instantiated | No | Forbidden | [complex.schema.json](complex.schema.json) | + +## Schema Hierarchy + +* Enumerated `https://example.com/schemas/complex` + * [Abstract](abstract.schema.md) `https://example.com/schemas/abstract` + * [Simple](simple.schema.md) `https://example.com/schemas/simple` + +# Enumerated Properties + +| Property | Type | Required | Defined by | +|----------|------|----------|------------| +| [refabstract](#refabstract) | complex | **Required** | Enumerated (this schema) | +| [refnamed](#refnamed) | complex | Optional | Enumerated (this schema) | + +## refabstract + + + +`refabstract` +* is **required** +* type: complex +* defined in this schema + +### refabstract Type + +Unknown type ``. + +```json +{ + "properties": { + "foo": { + "type": "string", + "description": "A unique identifier given to every addressable thing." + } + }, + "required": true, + "simpletype": "complex" +} +``` + + + + + +## refnamed + + + +`refnamed` +* is optional +* type: complex +* defined in this schema + +### refnamed Type + +Unknown type ``. + +```json +{ + "$ref": "https://example.com/schemas/simple", + "$linkVal": "Simple", + "$linkPath": "simple.schema.md", + "simpletype": "complex" +} +``` + + + + diff --git a/examples/docs/deepextending.schema.md b/examples/docs/deepextending.schema.md index 6031d9442ee329b74bfe47ede2123215e9e09d93..ab3f4bd1cdcf04ac3209ec18dd0483dc050f11a6 100644 --- a/examples/docs/deepextending.schema.md +++ b/examples/docs/deepextending.schema.md @@ -3,7 +3,7 @@ template: reference foo: bar --- -# Custom Schema +# Deeply Extending Schema ``` https://example.com/schemas/deepextending @@ -17,19 +17,19 @@ This is an extending schema. It is extending another extending schema. It pulls ## Schema Hierarchy -* Custom `https://example.com/schemas/deepextending` +* Deeply Extending `https://example.com/schemas/deepextending` * [Extensible](extensible.schema.md) `https://example.com/schemas/extensible` * [Definitions](definitions.schema.md) `https://example.com/schemas/definitions` * [Extending](extending.schema.md) `https://example.com/schemas/extending` -# Custom Properties +# Deeply Extending Properties | Property | Type | Required | Defined by | |----------|------|----------|------------| | [bar](#bar) | `string` | Optional | [Extensible](extensible.schema.md#bar) | | [id](#id) | `string` | Optional | [Definitions](definitions.schema.md#id) | | [baz](#baz) | `string` | Optional | [Extending](extending.schema.md#baz) | -| [hey](#hey) | `string` | Optional | Custom (this schema) | +| [hey](#hey) | `string` | Optional | Deeply Extending (this schema) | ## bar diff --git a/examples/generated-schemas/complex.schema.json b/examples/generated-schemas/complex.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..c11dfd00f14db7c799fa8e0835a82fb7e9397f18 --- /dev/null +++ b/examples/generated-schemas/complex.schema.json @@ -0,0 +1,24 @@ +{ + "meta:license": [ + "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" + ], + "$schema": "http://json-schema.org/draft-06/schema#", + "$id": "https://example.com/schemas/complex", + "title": "Enumerated ", + "type": "object", + "description": "This is an example schema that uses types defined in other schemas.", + "properties": { + "refabstract": { + "$ref": "https://example.com/schemas/abstract#/definitions/first" + }, + "refnamed": { + "$ref": "https://example.com/schemas/simple" + } + }, + "required": [ + "refabstract" + ] +} \ No newline at end of file diff --git a/examples/generated-schemas/deepextending.schema.json b/examples/generated-schemas/deepextending.schema.json index b5228aa1971eef78d9cfa5ffba95f743c83efda9..72df4ee61268bab98a4de62da28f85930d304c16 100644 --- a/examples/generated-schemas/deepextending.schema.json +++ b/examples/generated-schemas/deepextending.schema.json @@ -7,7 +7,7 @@ ], "$schema": "http://json-schema.org/draft-06/schema#", "$id": "https://example.com/schemas/deepextending", - "title": "Custom", + "title": "Deeply Extending", "description": "This is an extending schema. It is extending another extending schema. It pulls `definitions` from other schemas.", "type": "object", "meta:extensible": true, diff --git a/examples/schemas/complex.schema.json b/examples/schemas/complex.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..80e3f7abc433908d430c3b9815bec2c9645140a1 --- /dev/null +++ b/examples/schemas/complex.schema.json @@ -0,0 +1,24 @@ +{ + "meta:license": [ + "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" + ], + "$schema": "http://json-schema.org/draft-06/schema#", + "$id": "https://example.com/schemas/complex", + "title": "Enumerated ", + "type": "object", + "description": "This is an example schema that uses types defined in other schemas.", + "properties": { + "refabstract": { + "$ref": "https://example.com/schemas/abstract#/definitions/first" + }, + "refnamed": { + "$ref": "https://example.com/schemas/simple" + } + }, + "required": [ + "refabstract" + ] +} diff --git a/examples/schemas/deepextending.schema.json b/examples/schemas/deepextending.schema.json index fd0f03e13b47df2300dff2e79a22bef9a9fc0d27..192707d9a3deca9b04d33338bd088c3e8e88423c 100644 --- a/examples/schemas/deepextending.schema.json +++ b/examples/schemas/deepextending.schema.json @@ -7,7 +7,7 @@ ], "$schema": "http://json-schema.org/draft-06/schema#", "$id": "https://example.com/schemas/deepextending", - "title": "Custom", + "title": "Deeply Extending", "description": "This is an extending schema. It is extending another extending schema. It pulls `definitions` from other schemas.", "type": "object", "meta:extensible": true,