From c7b9b820e10979ad46aa6022e632d01a16852ad4 Mon Sep 17 00:00:00 2001 From: Lars Trieloff <trieloff@adobe.com> Date: Wed, 13 Dec 2017 16:43:30 +0000 Subject: [PATCH] [trivial] add an example of an abstract schema --- examples/docs/README.md | 1 + examples/docs/abstract.schema.md | 32 +++++++++++++++++++ .../generated-schemas/abstract.schema.json | 31 ++++++++++++++++++ examples/schemas/abstract.schema.json | 31 ++++++++++++++++++ 4 files changed, 95 insertions(+) create mode 100644 examples/docs/abstract.schema.md create mode 100644 examples/generated-schemas/abstract.schema.json create mode 100644 examples/schemas/abstract.schema.json diff --git a/examples/docs/README.md b/examples/docs/README.md index 8b904f2..13ab963 100644 --- a/examples/docs/README.md +++ b/examples/docs/README.md @@ -6,6 +6,7 @@ ## / +* [Abstract](./abstract.schema.md) – `https://example.com/schemas/abstract` * [Definitions](./definitions.schema.md) – `https://example.com/schemas/definitions` * [Example](./example.schema.md) – `https://example.com/schemas/example` * [Simple](./simple.schema.md) – `https://example.com/schemas/simple` diff --git a/examples/docs/abstract.schema.md b/examples/docs/abstract.schema.md new file mode 100644 index 0000000..1abdf63 --- /dev/null +++ b/examples/docs/abstract.schema.md @@ -0,0 +1,32 @@ + + + + +# Abstract + + +* **Type:** object + +This is an abstract schema. It has `definitions`, but does not declare any properties + + + + + + +## first +### Properties + +### foo +* **Type:** string + + A unique identifier given to every addressable thing. + +## second +### Properties + +### bar +* **Type:** string + + A unique identifier given to every addressable thing. + diff --git a/examples/generated-schemas/abstract.schema.json b/examples/generated-schemas/abstract.schema.json new file mode 100644 index 0000000..206719e --- /dev/null +++ b/examples/generated-schemas/abstract.schema.json @@ -0,0 +1,31 @@ +{ + "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/abstract", + "title": "Abstract", + "description": "This is an abstract schema. It has `definitions`, but does not declare any properties", + "type": "object", + "definitions": { + "first": { + "properties": { + "foo": { + "type": "string", + "description": "A unique identifier given to every addressable thing." + } + } + }, + "second": { + "properties": { + "bar": { + "type": "string", + "description": "A unique identifier given to every addressable thing." + } + } + } + } +} \ No newline at end of file diff --git a/examples/schemas/abstract.schema.json b/examples/schemas/abstract.schema.json new file mode 100644 index 0000000..fe83ee6 --- /dev/null +++ b/examples/schemas/abstract.schema.json @@ -0,0 +1,31 @@ +{ + "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/abstract", + "title": "Abstract", + "description": "This is an abstract schema. It has `definitions`, but does not declare any properties", + "type": "object", + "definitions": { + "first": { + "properties": { + "foo": { + "type": "string", + "description": "A unique identifier given to every addressable thing." + } + } + }, + "second": { + "properties": { + "bar": { + "type": "string", + "description": "A unique identifier given to every addressable thing." + } + } + } + } +} -- GitLab