@adobe/jsonschema2md 6.1.3 → 7.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{.eslintrc.js → .eslintrc.cjs} +3 -17
- package/{.releaserc.js → .releaserc.cjs} +0 -0
- package/CHANGELOG.md +41 -0
- package/README.md +1 -1
- package/cli.js +1 -1
- package/lib/formatInfo.js +17 -19
- package/lib/formattingTools.js +6 -8
- package/lib/index.js +176 -81
- package/lib/keywords.js +2 -4
- package/lib/locales/update.js +2 -2
- package/lib/markdownBuilder.js +62 -44
- package/lib/readmeBuilder.js +15 -15
- package/lib/schemaProxy.js +32 -26
- package/lib/symbols.js +14 -2
- package/lib/traverseSchema.js +5 -5
- package/lib/writeMarkdown.js +87 -41
- package/lib/writeSchema.js +46 -21
- package/package.json +41 -30
- package/types/api.d.ts +72 -0
- package/types/formatInfo.d.ts +19 -0
- package/types/formattingTools.d.ts +2 -0
- package/types/index.d.ts +75 -0
- package/types/keywords.d.ts +2 -0
- package/types/markdownBuilder.d.ts +8 -0
- package/types/readmeBuilder.d.ts +5 -0
- package/types/schemaProxy.d.ts +1 -0
- package/types/symbols.d.ts +11 -0
- package/types/traverseSchema.d.ts +6 -0
- package/types/writeMarkdown.d.ts +56 -0
- package/types/writeSchema.d.ts +19 -0
- package/.circleci/config.yml +0 -83
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -23
- package/.github/workflows/semantic-release.yaml +0 -55
- package/.github/workflows/semver-check.yaml +0 -16
- package/.renovaterc.json +0 -3
- package/.tidelift.yml +0 -32
- package/crowdin.yml +0 -4
- package/examples/abstract.md +0 -3
- package/examples/docs/README.md +0 -121
- package/examples/docs/abstract-definitions-first-properties-foo.md +0 -15
- package/examples/docs/abstract-definitions-first-properties-nonfoo.md +0 -23
- package/examples/docs/abstract-definitions-first.md +0 -66
- package/examples/docs/abstract-definitions-second-properties-bar.md +0 -15
- package/examples/docs/abstract-definitions-second.md +0 -39
- package/examples/docs/abstract-definitions.md +0 -15
- package/examples/docs/abstract.md +0 -104
- package/examples/docs/arrays-properties-boollist-items.md +0 -15
- package/examples/docs/arrays-properties-boollist.md +0 -19
- package/examples/docs/arrays-properties-coordinatelist-items-items.md +0 -21
- package/examples/docs/arrays-properties-coordinatelist-items.md +0 -21
- package/examples/docs/arrays-properties-coordinatelist.md +0 -19
- package/examples/docs/arrays-properties-intlist-items.md +0 -15
- package/examples/docs/arrays-properties-intlist.md +0 -21
- package/examples/docs/arrays-properties-jointypelist-items-oneof-0-properties-foo.md +0 -21
- package/examples/docs/arrays-properties-jointypelist-items-oneof-0.md +0 -45
- package/examples/docs/arrays-properties-jointypelist-items-oneof-1-properties-bar.md +0 -21
- package/examples/docs/arrays-properties-jointypelist-items-oneof-1.md +0 -45
- package/examples/docs/arrays-properties-jointypelist-items.md +0 -21
- package/examples/docs/arrays-properties-jointypelist.md +0 -15
- package/examples/docs/arrays-properties-list-items.md +0 -15
- package/examples/docs/arrays-properties-list.md +0 -15
- package/examples/docs/arrays-properties-listlist-items.md +0 -15
- package/examples/docs/arrays-properties-listlist.md +0 -15
- package/examples/docs/arrays-properties-numlist-items.md +0 -19
- package/examples/docs/arrays-properties-numlist.md +0 -19
- package/examples/docs/arrays-properties-objectlist-items-properties-a.md +0 -15
- package/examples/docs/arrays-properties-objectlist-items-properties-b.md +0 -15
- package/examples/docs/arrays-properties-objectlist-items.md +0 -58
- package/examples/docs/arrays-properties-objectlist.md +0 -15
- package/examples/docs/arrays-properties-stringlistlist-items-items.md +0 -15
- package/examples/docs/arrays-properties-stringlistlist-items.md +0 -15
- package/examples/docs/arrays-properties-stringlistlist.md +0 -15
- package/examples/docs/arrays-properties-tuple-items-negative-integer.md +0 -19
- package/examples/docs/arrays-properties-tuple-items-positive-integer.md +0 -19
- package/examples/docs/arrays-properties-tuple-zero.md +0 -23
- package/examples/docs/arrays-properties-tuple.md +0 -21
- package/examples/docs/arrays.md +0 -240
- package/examples/docs/complex-additionalproperties.md +0 -15
- package/examples/docs/complex-patternproperties-int.md +0 -15
- package/examples/docs/complex-patternproperties-str.md +0 -15
- package/examples/docs/complex-patternproperties.md +0 -15
- package/examples/docs/complex-properties-and-allof-0.md +0 -19
- package/examples/docs/complex-properties-and-allof-1.md +0 -19
- package/examples/docs/complex-properties-and.md +0 -21
- package/examples/docs/complex-properties-or-anyof-0.md +0 -15
- package/examples/docs/complex-properties-or-anyof-1.md +0 -19
- package/examples/docs/complex-properties-or.md +0 -21
- package/examples/docs/complex-properties-reflocalfiledef.md +0 -39
- package/examples/docs/complex-properties-refnestedobj-properties-refobj.md +0 -39
- package/examples/docs/complex-properties-refnestedobj.md +0 -39
- package/examples/docs/complex-properties-refobj.md +0 -39
- package/examples/docs/complex-properties-xor-oneof-0.md +0 -19
- package/examples/docs/complex-properties-xor-oneof-1.md +0 -19
- package/examples/docs/complex-properties-xor.md +0 -21
- package/examples/docs/complex.md +0 -285
- package/examples/docs/constants-properties-hello.md +0 -23
- package/examples/docs/constants.md +0 -47
- package/examples/docs/custom-allof-0.md +0 -15
- package/examples/docs/custom-allof-1.md +0 -39
- package/examples/docs/custom-allof-2.md +0 -39
- package/examples/docs/custom-definitions-first-properties-foo.md +0 -15
- package/examples/docs/custom-definitions-first-properties.md +0 -15
- package/examples/docs/custom-definitions-first.md +0 -39
- package/examples/docs/custom-definitions-second-properties-bar.md +0 -15
- package/examples/docs/custom-definitions-second-properties.md +0 -15
- package/examples/docs/custom-definitions-second.md +0 -39
- package/examples/docs/custom-definitions.md +0 -15
- package/examples/docs/custom.md +0 -85
- package/examples/docs/deepextending-allof-0.md +0 -49
- package/examples/docs/deepextending-allof-1.md +0 -89
- package/examples/docs/deepextending-allof-3.md +0 -39
- package/examples/docs/deepextending-definitions-fourth-properties-hey.md +0 -15
- package/examples/docs/deepextending-definitions-fourth-properties.md +0 -15
- package/examples/docs/deepextending-definitions-fourth.md +0 -39
- package/examples/docs/deepextending-definitions.md +0 -15
- package/examples/docs/deepextending.md +0 -57
- package/examples/docs/definitions-definitions-myid-properties-id-1.md +0 -19
- package/examples/docs/definitions-definitions-myid-properties-id.md +0 -19
- package/examples/docs/definitions-definitions-myid-properties-metaid.md +0 -19
- package/examples/docs/definitions-definitions-myid-properties.md +0 -15
- package/examples/docs/definitions-definitions-myid.md +0 -89
- package/examples/docs/definitions-definitions.md +0 -15
- package/examples/docs/definitions.md +0 -117
- package/examples/docs/enums-properties-enumerated-nested-properties-test.md +0 -25
- package/examples/docs/enums-properties-enumerated-nested.md +0 -49
- package/examples/docs/enums-properties-hello.md +0 -24
- package/examples/docs/enums.md +0 -67
- package/examples/docs/example-properties-bar.md +0 -25
- package/examples/docs/example-properties-foo.md +0 -21
- package/examples/docs/example.md +0 -83
- package/examples/docs/examples-properties-bar.md +0 -25
- package/examples/docs/examples-properties-foo.md +0 -21
- package/examples/docs/examples.md +0 -90
- package/examples/docs/extending-definitions-third-properties-baaaz.md +0 -21
- package/examples/docs/extending-definitions-third.md +0 -45
- package/examples/docs/extending-definitions.md +0 -15
- package/examples/docs/extending.md +0 -61
- package/examples/docs/extensible-definitions-first-properties-foo.md +0 -21
- package/examples/docs/extensible-definitions-first-properties.md +0 -15
- package/examples/docs/extensible-definitions-first.md +0 -45
- package/examples/docs/extensible-definitions-second-properties-bar.md +0 -25
- package/examples/docs/extensible-definitions-second-properties.md +0 -15
- package/examples/docs/extensible-definitions-second.md +0 -49
- package/examples/docs/extensible-definitions.md +0 -15
- package/examples/docs/extensible.md +0 -93
- package/examples/docs/identifiable-properties-id.md +0 -19
- package/examples/docs/identifiable.md +0 -43
- package/examples/docs/join-oneof-0-not-oneof-0-properties-foo.md +0 -21
- package/examples/docs/join-oneof-0-not-oneof-0.md +0 -45
- package/examples/docs/join-oneof-0-not-oneof-1-properties-bar.md +0 -21
- package/examples/docs/join-oneof-0-not-oneof-1.md +0 -45
- package/examples/docs/join-oneof-0-not.md +0 -21
- package/examples/docs/join-oneof-0.md +0 -23
- package/examples/docs/join-oneof-1-allof-0-properties-foo.md +0 -21
- package/examples/docs/join-oneof-1-allof-0.md +0 -45
- package/examples/docs/join-oneof-1.md +0 -19
- package/examples/docs/join-oneof-2-anyof-0-properties-bar.md +0 -21
- package/examples/docs/join-oneof-2-anyof-0.md +0 -45
- package/examples/docs/join-oneof-2.md +0 -19
- package/examples/docs/join.md +0 -33
- package/examples/docs/nestedobj-properties-settings-properties-collaborators-patternproperties-.md +0 -15
- package/examples/docs/nestedobj-properties-settings-properties-collaborators-patternproperties.md +0 -15
- package/examples/docs/nestedobj-properties-settings-properties-collaborators-properties-id.md +0 -15
- package/examples/docs/nestedobj-properties-settings-properties-collaborators.md +0 -58
- package/examples/docs/nestedobj-properties-settings.md +0 -39
- package/examples/docs/nestedobj.md +0 -39
- package/examples/docs/pattern-patternproperties-0-9.md +0 -21
- package/examples/docs/pattern-patternproperties.md +0 -15
- package/examples/docs/pattern.md +0 -45
- package/examples/docs/simple-properties-id.md +0 -19
- package/examples/docs/simple.md +0 -43
- package/examples/docs/simpletypes-properties-integer_threes.md +0 -23
- package/examples/docs/simpletypes-properties-interger_constrained.md +0 -19
- package/examples/docs/simpletypes-properties-interger_unconstrained.md +0 -15
- package/examples/docs/simpletypes-properties-number_constrained.md +0 -19
- package/examples/docs/simpletypes-properties-number_unconstrained.md +0 -15
- package/examples/docs/simpletypes-properties-string_date.md +0 -19
- package/examples/docs/simpletypes-properties-string_email.md +0 -19
- package/examples/docs/simpletypes-properties-string_hostname.md +0 -19
- package/examples/docs/simpletypes-properties-string_ipv4.md +0 -19
- package/examples/docs/simpletypes-properties-string_ipv6.md +0 -19
- package/examples/docs/simpletypes-properties-string_length.md +0 -31
- package/examples/docs/simpletypes-properties-string_pattern-metaenum.md +0 -15
- package/examples/docs/simpletypes-properties-string_pattern.md +0 -39
- package/examples/docs/simpletypes-properties-string_pattern_noexample.md +0 -25
- package/examples/docs/simpletypes-properties-string_pattern_singleexample.md +0 -31
- package/examples/docs/simpletypes-properties-string_unconstrained.md +0 -21
- package/examples/docs/simpletypes-properties-string_uri.md +0 -19
- package/examples/docs/simpletypes-properties-yesno.md +0 -15
- package/examples/docs/simpletypes.md +0 -455
- package/examples/docs/stabilizing-properties-id.md +0 -19
- package/examples/docs/stabilizing.md +0 -43
- package/examples/docs/subdir-allof-0.md +0 -43
- package/examples/docs/subdir-definitions-content-properties-id.md +0 -19
- package/examples/docs/subdir-definitions-content-properties.md +0 -15
- package/examples/docs/subdir-definitions-content.md +0 -43
- package/examples/docs/subdir-definitions.md +0 -15
- package/examples/docs/subdir.md +0 -55
- package/examples/docs/typearrays-properties-null.md +0 -15
- package/examples/docs/typearrays-properties-string-or-null.md +0 -15
- package/examples/docs/typearrays-properties-string-or-number-null.md +0 -15
- package/examples/docs/typearrays-properties-string-or-number.md +0 -15
- package/examples/docs/typearrays.md +0 -96
- package/examples/docsWithoutHeader/arrays.schema.md +0 -254
- package/examples/generated-schemas/abstract.schema.json +0 -1
- package/examples/generated-schemas/arrays.schema.json +0 -1
- package/examples/generated-schemas/complex.schema.json +0 -1
- package/examples/generated-schemas/constants.schema.json +0 -1
- package/examples/generated-schemas/custom.schema.json +0 -1
- package/examples/generated-schemas/deepextending.schema.json +0 -1
- package/examples/generated-schemas/definitions.schema.json +0 -1
- package/examples/generated-schemas/enums.schema.json +0 -1
- package/examples/generated-schemas/example.schema.json +0 -1
- package/examples/generated-schemas/examples.schema.json +0 -1
- package/examples/generated-schemas/extending.schema.json +0 -1
- package/examples/generated-schemas/extensible.schema.json +0 -1
- package/examples/generated-schemas/identifiable.schema.json +0 -1
- package/examples/generated-schemas/join.schema.json +0 -1
- package/examples/generated-schemas/nestedobj.schema.json +0 -1
- package/examples/generated-schemas/pattern.schema.json +0 -1
- package/examples/generated-schemas/simple.schema.json +0 -1
- package/examples/generated-schemas/simpletypes.schema.json +0 -1
- package/examples/generated-schemas/stabilizing.schema.json +0 -1
- package/examples/generated-schemas/subdir/subdir.schema.json +0 -1
- package/examples/generated-schemas/typearrays.schema.json +0 -1
- package/examples/schemas/abstract.schema.json +0 -44
- package/examples/schemas/arrays.schema.json +0 -185
- package/examples/schemas/complex.schema.json +0 -123
- package/examples/schemas/constants.schema.json +0 -25
- package/examples/schemas/custom.schema.json +0 -41
- package/examples/schemas/deepextending.schema.json +0 -37
- package/examples/schemas/definitions.description.md +0 -17
- package/examples/schemas/definitions.schema.json +0 -46
- package/examples/schemas/enums.schema.json +0 -42
- package/examples/schemas/example.example.1.json +0 -4
- package/examples/schemas/example.schema.json +0 -29
- package/examples/schemas/examples.example.1.json +0 -4
- package/examples/schemas/examples.example.2.json +0 -4
- package/examples/schemas/examples.schema.json +0 -32
- package/examples/schemas/extending.schema.json +0 -38
- package/examples/schemas/extensible.schema.json +0 -38
- package/examples/schemas/identifiable.schema.json +0 -22
- package/examples/schemas/join.schema.json +0 -88
- package/examples/schemas/nestedobj.schema.json +0 -35
- package/examples/schemas/pattern.schema.json +0 -21
- package/examples/schemas/simple.schema.json +0 -22
- package/examples/schemas/simpletypes.schema.json +0 -151
- package/examples/schemas/stabilizing.schema.json +0 -23
- package/examples/schemas/subdir/subdir.schema.json +0 -29
- package/examples/schemas/typearrays.schema.json +0 -39
- package/examples/status.md +0 -3
- package/test/api.test.js +0 -55
- package/test/cyclicSchemaIntegration.test.js +0 -87
- package/test/fixtures/additionalprops/additionalprops.schema.json +0 -6
- package/test/fixtures/additionalprops/arrays.schema.json +0 -9
- package/test/fixtures/arrays/arrays.schema.json +0 -201
- package/test/fixtures/arrays/tuple.schema.json +0 -35
- package/test/fixtures/content/html.schema.json +0 -5
- package/test/fixtures/content/jwt.schema.json +0 -26
- package/test/fixtures/content/png.schema.json +0 -6
- package/test/fixtures/cyclic/one.description.md +0 -1
- package/test/fixtures/cyclic/one.example.1.json +0 -1
- package/test/fixtures/cyclic/one.schema.json +0 -17
- package/test/fixtures/cyclic/three.schema.json +0 -17
- package/test/fixtures/cyclic/two.schema.json +0 -17
- package/test/fixtures/deadref/deadref.schema.json +0 -6
- package/test/fixtures/enums/arrayenums.schema.json +0 -29
- package/test/fixtures/enums/enums.schema.json +0 -29
- package/test/fixtures/example/example.schema.json +0 -52
- package/test/fixtures/format/format.schema.json +0 -25
- package/test/fixtures/identifiable/identifiable.schema.json +0 -22
- package/test/fixtures/not/not.schema.json +0 -7
- package/test/fixtures/null/null.schema.json +0 -14
- package/test/fixtures/nullable/array.schema.json +0 -17
- package/test/fixtures/readme-1/abstract.schema.json +0 -50
- package/test/fixtures/readme-1/complex.schema.json +0 -118
- package/test/fixtures/readme-1/simple.schema.json +0 -30
- package/test/fixtures/skipproperties/complete.schema.json +0 -29
- package/test/fixtures/stringformats/simpletypes.schema.json +0 -211
- package/test/fixtures/title/meta.schema.json +0 -53
- package/test/fixtures/type/button.schema.json +0 -28
- package/test/fixtures/type/type.schema.json +0 -20
- package/test/fixtures/types/merged.schema.json +0 -10
- package/test/fixtures/types/object.schema.json +0 -3
- package/test/fixtures/types/objectorarray.schema.json +0 -3
- package/test/fixtures/types/undefined.schema.json +0 -3
- package/test/fixtures/types/wrong.schema.json +0 -6
- package/test/formatting.test.js +0 -59
- package/test/markdownBuilder.test.js +0 -441
- package/test/readmeBuilder.test.js +0 -106
- package/test/schemaProxy.test.js +0 -187
- package/test/testUtils.js +0 -88
- package/test/testintegration.test.js +0 -65
- package/test/traverseSchema.test.js +0 -111
- package/test/zSchemaCoverage.test.js +0 -186
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"meta:license": [
|
|
3
|
-
"Copyright 2017 Adobe Systems Incorporated. All rights reserved.",
|
|
4
|
-
"This file is licensed to you under the Apache License, Version 2.0 (the 'License');",
|
|
5
|
-
"you may not use this file except in compliance with the License. You may obtain a copy",
|
|
6
|
-
"of the License at http://www.apache.org/licenses/LICENSE-2.0"
|
|
7
|
-
],
|
|
8
|
-
"$schema": "http://json-schema.org/draft-06/schema#",
|
|
9
|
-
"$id": "https://example.com/schemas/abstract",
|
|
10
|
-
"title": "Abstract",
|
|
11
|
-
"description": "This is an abstract schema. It has `definitions`, but does not declare any properties",
|
|
12
|
-
"type": "object",
|
|
13
|
-
"definitions": {
|
|
14
|
-
"first": {
|
|
15
|
-
"type": "object",
|
|
16
|
-
"properties": {
|
|
17
|
-
"foo": {
|
|
18
|
-
"type": "string",
|
|
19
|
-
"description": "A unique identifier given to every addressable thing.",
|
|
20
|
-
"version": "1.0.0",
|
|
21
|
-
"testProperty": "test"
|
|
22
|
-
},
|
|
23
|
-
"nonfoo": {
|
|
24
|
-
"type": "boolean",
|
|
25
|
-
"const": false,
|
|
26
|
-
"description": "This is not foo.",
|
|
27
|
-
"version": "1.0.0",
|
|
28
|
-
"testProperty": "test"
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
"second": {
|
|
33
|
-
"type":"object",
|
|
34
|
-
"properties": {
|
|
35
|
-
"bar": {
|
|
36
|
-
"type": "string",
|
|
37
|
-
"description": "A unique identifier given to every addressable thing.",
|
|
38
|
-
"version": "1.0.0",
|
|
39
|
-
"testProperty": "test"
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"meta:license": [
|
|
3
|
-
"Copyright 2017 Adobe Systems Incorporated. All rights reserved.",
|
|
4
|
-
"This file is licensed to you under the Apache License, Version 2.0 (the 'License');",
|
|
5
|
-
"you may not use this file except in compliance with the License. You may obtain a copy",
|
|
6
|
-
"of the License at http://www.apache.org/licenses/LICENSE-2.0"
|
|
7
|
-
],
|
|
8
|
-
"$schema": "http://json-schema.org/draft-06/schema#",
|
|
9
|
-
"$id": "https://example.com/schemas/arrays",
|
|
10
|
-
"title": "Arrays",
|
|
11
|
-
"type": "object",
|
|
12
|
-
"description": "This is an example schema with examples for multiple array types and their constraints.",
|
|
13
|
-
"properties": {
|
|
14
|
-
"tuple": {
|
|
15
|
-
"type": "array",
|
|
16
|
-
"description": "This is an array of two values, one positive, one negative. All additional values must be 0.",
|
|
17
|
-
"items": [
|
|
18
|
-
{
|
|
19
|
-
"title": "Positive Integer",
|
|
20
|
-
"type": "integer",
|
|
21
|
-
"minimum": 0
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"title": "Negative Integer",
|
|
25
|
-
"type": "integer",
|
|
26
|
-
"maximum": 0
|
|
27
|
-
}
|
|
28
|
-
],
|
|
29
|
-
"additionalItems": {
|
|
30
|
-
"title": "Zero",
|
|
31
|
-
"const": 0
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
"list": {
|
|
35
|
-
"type": "array",
|
|
36
|
-
"description": "This is an array",
|
|
37
|
-
"items": {
|
|
38
|
-
"type": "string"
|
|
39
|
-
},
|
|
40
|
-
"version": "1.0.0",
|
|
41
|
-
"testProperty": "test"
|
|
42
|
-
},
|
|
43
|
-
"listlist": {
|
|
44
|
-
"type": "array",
|
|
45
|
-
"description": "This is an array of arrays",
|
|
46
|
-
"items": {
|
|
47
|
-
"type": "array"
|
|
48
|
-
},
|
|
49
|
-
"version": "1.0.0",
|
|
50
|
-
"testProperty": "test"
|
|
51
|
-
},
|
|
52
|
-
"stringlistlist": {
|
|
53
|
-
"type": "array",
|
|
54
|
-
"description": "This is an array of arrays of strings",
|
|
55
|
-
"items": {
|
|
56
|
-
"type": "array",
|
|
57
|
-
"items": {
|
|
58
|
-
"type": "string"
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
"version": "1.0.0",
|
|
62
|
-
"testProperty": "test"
|
|
63
|
-
},
|
|
64
|
-
"intlist": {
|
|
65
|
-
"type": "array",
|
|
66
|
-
"description": "This is an array",
|
|
67
|
-
"items": {
|
|
68
|
-
"type": "integer"
|
|
69
|
-
},
|
|
70
|
-
"maxItems": 10,
|
|
71
|
-
"minItems": 1,
|
|
72
|
-
"version": "1.0.0",
|
|
73
|
-
"testProperty": "test"
|
|
74
|
-
},
|
|
75
|
-
"boollist": {
|
|
76
|
-
"type": "array",
|
|
77
|
-
"description": "This is an array",
|
|
78
|
-
"items": {
|
|
79
|
-
"type": "boolean"
|
|
80
|
-
},
|
|
81
|
-
"minItems": 1,
|
|
82
|
-
"version": "1.0.0",
|
|
83
|
-
"testProperty": "test"
|
|
84
|
-
},
|
|
85
|
-
"numlist": {
|
|
86
|
-
"type": "array",
|
|
87
|
-
"description": "This is an array",
|
|
88
|
-
"items": {
|
|
89
|
-
"type": "number",
|
|
90
|
-
"minimum": 10
|
|
91
|
-
},
|
|
92
|
-
"maxItems": 10,
|
|
93
|
-
"version": "1.0.0",
|
|
94
|
-
"testProperty": "test"
|
|
95
|
-
},
|
|
96
|
-
"coordinatelist": {
|
|
97
|
-
"type": "array",
|
|
98
|
-
"description": "This is an array of coordinates in three-dimensional space.",
|
|
99
|
-
"items": {
|
|
100
|
-
"type": "array",
|
|
101
|
-
"minItems": 3,
|
|
102
|
-
"maxItems": 3,
|
|
103
|
-
"description": "A coordinate, specified by `x`, `y`, and `z` values",
|
|
104
|
-
"items": {
|
|
105
|
-
"type": "number",
|
|
106
|
-
"minimum": 0,
|
|
107
|
-
"maximum": 10
|
|
108
|
-
},
|
|
109
|
-
"version": "1.0.0",
|
|
110
|
-
"testProperty": "test"
|
|
111
|
-
},
|
|
112
|
-
"version": "1.0.0",
|
|
113
|
-
"testProperty": "test",
|
|
114
|
-
"maxItems": 10
|
|
115
|
-
},
|
|
116
|
-
"objectlist": {
|
|
117
|
-
"type": "array",
|
|
118
|
-
"description": "An array of simple objects",
|
|
119
|
-
"items": {
|
|
120
|
-
"type": "object",
|
|
121
|
-
"required": [
|
|
122
|
-
"a"
|
|
123
|
-
],
|
|
124
|
-
"properties": {
|
|
125
|
-
"a": {
|
|
126
|
-
"type": "string",
|
|
127
|
-
"description": "The a property",
|
|
128
|
-
"version": "1.0.0",
|
|
129
|
-
"testProperty": "test"
|
|
130
|
-
},
|
|
131
|
-
"b": {
|
|
132
|
-
"type": "integer",
|
|
133
|
-
"description": "The b property",
|
|
134
|
-
"version": "1.0.0",
|
|
135
|
-
"testProperty": "test"
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
},
|
|
139
|
-
"version": "1.0.0",
|
|
140
|
-
"testProperty": "test"
|
|
141
|
-
},
|
|
142
|
-
"JoinTypelist": {
|
|
143
|
-
"type": "array",
|
|
144
|
-
"description": "An array of simple objects",
|
|
145
|
-
"items": {
|
|
146
|
-
"oneOf": [
|
|
147
|
-
{
|
|
148
|
-
"type": "object",
|
|
149
|
-
"description": "A simple string.",
|
|
150
|
-
"properties": {
|
|
151
|
-
"foo": {
|
|
152
|
-
"type": "string",
|
|
153
|
-
"description": "A simple string.",
|
|
154
|
-
"examples": [
|
|
155
|
-
"hello"
|
|
156
|
-
],
|
|
157
|
-
"version": "1.0.0",
|
|
158
|
-
"testProperty": "test"
|
|
159
|
-
}
|
|
160
|
-
},
|
|
161
|
-
"version": "1.0.0",
|
|
162
|
-
"testProperty": "test"
|
|
163
|
-
},
|
|
164
|
-
{
|
|
165
|
-
"type": "object",
|
|
166
|
-
"description": "Another simple string.",
|
|
167
|
-
"properties": {
|
|
168
|
-
"bar": {
|
|
169
|
-
"type": "string",
|
|
170
|
-
"description": "A simple string.",
|
|
171
|
-
"examples": [
|
|
172
|
-
"world"
|
|
173
|
-
],
|
|
174
|
-
"version": "1.0.0",
|
|
175
|
-
"testProperty": "test"
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
]
|
|
180
|
-
},
|
|
181
|
-
"version": "1.0.0",
|
|
182
|
-
"testProperty": "test"
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
}
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"meta:license": [
|
|
3
|
-
"Copyright 2017 Adobe Systems Incorporated. All rights reserved.",
|
|
4
|
-
"This file is licensed to you under the Apache License, Version 2.0 (the 'License');",
|
|
5
|
-
"you may not use this file except in compliance with the License. You may obtain a copy",
|
|
6
|
-
"of the License at http://www.apache.org/licenses/LICENSE-2.0"
|
|
7
|
-
],
|
|
8
|
-
"$schema": "http://json-schema.org/draft-06/schema#",
|
|
9
|
-
"$id": "https://example.com/schemas/complex",
|
|
10
|
-
"title": "Complex References",
|
|
11
|
-
"type": "object",
|
|
12
|
-
"description": "This is an example schema that uses types defined in other schemas.",
|
|
13
|
-
"properties": {
|
|
14
|
-
"refabstract": {
|
|
15
|
-
"$ref": "https://example.com/schemas/abstract#/definitions/first",
|
|
16
|
-
"version": "1.0.0",
|
|
17
|
-
"testProperty": "test"
|
|
18
|
-
},
|
|
19
|
-
"refnamed": {
|
|
20
|
-
"$ref": "https://example.com/schemas/simple",
|
|
21
|
-
"version": "1.0.0",
|
|
22
|
-
"testProperty": "test"
|
|
23
|
-
},
|
|
24
|
-
"refrefed": {
|
|
25
|
-
"$ref": "#/properties/refnamed",
|
|
26
|
-
"version": "1.0.0",
|
|
27
|
-
"testProperty": "test"
|
|
28
|
-
},
|
|
29
|
-
"refobj": {
|
|
30
|
-
"type": "object",
|
|
31
|
-
"properties": {
|
|
32
|
-
"foo": {
|
|
33
|
-
"$ref": "https://example.com/schemas/simple",
|
|
34
|
-
"version": "1.0.0",
|
|
35
|
-
"testProperty": "test"
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
"version": "1.0.0",
|
|
39
|
-
"testProperty": "test"
|
|
40
|
-
},
|
|
41
|
-
"refnestedobj": {
|
|
42
|
-
"type": "object",
|
|
43
|
-
"properties": {
|
|
44
|
-
"refobj": {
|
|
45
|
-
"type": "object",
|
|
46
|
-
"version": "1.0.0",
|
|
47
|
-
"testProperty": "test",
|
|
48
|
-
"properties": {
|
|
49
|
-
"foo": {
|
|
50
|
-
"$ref": "https://example.com/schemas/simple",
|
|
51
|
-
"version": "1.0.0",
|
|
52
|
-
"testProperty": "test"
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
"version": "1.0.0",
|
|
58
|
-
"testProperty": "test"
|
|
59
|
-
},
|
|
60
|
-
"reflocalfile": {
|
|
61
|
-
"$ref": "simple.schema.json#",
|
|
62
|
-
"version": "1.0.0",
|
|
63
|
-
"testProperty": "test"
|
|
64
|
-
},
|
|
65
|
-
"reflocalfiledef": {
|
|
66
|
-
"type": "object",
|
|
67
|
-
"version": "1.0.0",
|
|
68
|
-
"testProperty": "test",
|
|
69
|
-
"properties": {
|
|
70
|
-
"third": {
|
|
71
|
-
"$ref": "file://extending.schema.json#/definitions/third",
|
|
72
|
-
"version": "1.0.0",
|
|
73
|
-
"testProperty": "test"
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
"or": {
|
|
78
|
-
"description": "String or number…",
|
|
79
|
-
"anyOf": [
|
|
80
|
-
{ "type":"string" },
|
|
81
|
-
{ "type":"number", "minimum": 0}
|
|
82
|
-
],
|
|
83
|
-
"version": "1.0.0",
|
|
84
|
-
"testProperty": "test"
|
|
85
|
-
},
|
|
86
|
-
"and": {
|
|
87
|
-
"description": "Number in a range",
|
|
88
|
-
"allOf": [
|
|
89
|
-
{ "type":"number", "maximum": 10 },
|
|
90
|
-
{ "type":"number", "minimum": 0}
|
|
91
|
-
],
|
|
92
|
-
"version": "1.0.0",
|
|
93
|
-
"testProperty": "test"
|
|
94
|
-
},
|
|
95
|
-
"xor": {
|
|
96
|
-
"description": "Exclusive choice.",
|
|
97
|
-
"oneOf": [
|
|
98
|
-
{ "type":"number", "maximum": 0 },
|
|
99
|
-
{ "type":"number", "minimum": 10}
|
|
100
|
-
],
|
|
101
|
-
"version": "1.0.0",
|
|
102
|
-
"testProperty": "test"
|
|
103
|
-
}
|
|
104
|
-
},
|
|
105
|
-
"required": [
|
|
106
|
-
"refabstract"
|
|
107
|
-
],
|
|
108
|
-
"additionalProperties": {
|
|
109
|
-
"type":"boolean"
|
|
110
|
-
},
|
|
111
|
-
"patternProperties": {
|
|
112
|
-
"int.*": {
|
|
113
|
-
"type": "integer",
|
|
114
|
-
"version": "1.0.0",
|
|
115
|
-
"testProperty": "test"
|
|
116
|
-
},
|
|
117
|
-
"str.*": {
|
|
118
|
-
"type":"string",
|
|
119
|
-
"version": "1.0.0",
|
|
120
|
-
"testProperty": "test"
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"meta:license": [
|
|
3
|
-
"Copyright 2017 Adobe Systems Incorporated. All rights reserved.",
|
|
4
|
-
"This file is licensed to you under the Apache License, Version 2.0 (the 'License');",
|
|
5
|
-
"you may not use this file except in compliance with the License. You may obtain a copy",
|
|
6
|
-
"of the License at http://www.apache.org/licenses/LICENSE-2.0"
|
|
7
|
-
],
|
|
8
|
-
"$schema": "http://json-schema.org/draft-06/schema#",
|
|
9
|
-
"$id": "https://example.com/schemas/constants",
|
|
10
|
-
"title": "Constant Types",
|
|
11
|
-
"type": "object",
|
|
12
|
-
"description": "This is an example schema with examples for properties with constant values",
|
|
13
|
-
"properties": {
|
|
14
|
-
"hello": {
|
|
15
|
-
"type": "string",
|
|
16
|
-
"const": "World",
|
|
17
|
-
"description": "A simple string, without strong constraints.",
|
|
18
|
-
"version": "1.0.0",
|
|
19
|
-
"testProperty": "test"
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
"required": [
|
|
23
|
-
"hello"
|
|
24
|
-
]
|
|
25
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"meta:license": [
|
|
3
|
-
"Copyright 2017 Adobe Systems Incorporated. All rights reserved.",
|
|
4
|
-
"This file is licensed to you under the Apache License, Version 2.0 (the 'License');",
|
|
5
|
-
"you may not use this file except in compliance with the License. You may obtain a copy",
|
|
6
|
-
"of the License at http://www.apache.org/licenses/LICENSE-2.0"
|
|
7
|
-
],
|
|
8
|
-
"$schema": "http://json-schema.org/draft-06/schema#",
|
|
9
|
-
"$id": "https://example.com/schemas/custom",
|
|
10
|
-
"title": "Custom",
|
|
11
|
-
"description": "This is an extensible schema. It has `definitions`, that can be used in other schemas. Additionally, it allows custom properties.",
|
|
12
|
-
"type": "object",
|
|
13
|
-
"meta:extensible": true,
|
|
14
|
-
"definitions": {
|
|
15
|
-
"first": {
|
|
16
|
-
"properties": {
|
|
17
|
-
"foo": {
|
|
18
|
-
"type": "string",
|
|
19
|
-
"description": "A unique identifier given to every addressable thing.",
|
|
20
|
-
"version": "1.0.0",
|
|
21
|
-
"testProperty": "test"
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
"second": {
|
|
26
|
-
"properties": {
|
|
27
|
-
"bar": {
|
|
28
|
-
"type": "string",
|
|
29
|
-
"description": "A unique identifier given to every addressable thing.",
|
|
30
|
-
"version": "1.0.0",
|
|
31
|
-
"testProperty": "test"
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
"allOf": [
|
|
37
|
-
{ "$ref": "https://ns.adobe.com/xdm/common/extensible.schema.json#/definitions/@context"},
|
|
38
|
-
{ "$ref": "#/definitions/first" },
|
|
39
|
-
{ "$ref": "#/definitions/second" }
|
|
40
|
-
]
|
|
41
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"meta:license": [
|
|
3
|
-
"Copyright 2017 Adobe Systems Incorporated. All rights reserved.",
|
|
4
|
-
"This file is licensed to you under the Apache License, Version 2.0 (the 'License');",
|
|
5
|
-
"you may not use this file except in compliance with the License. You may obtain a copy",
|
|
6
|
-
"of the License at http://www.apache.org/licenses/LICENSE-2.0"
|
|
7
|
-
],
|
|
8
|
-
"$schema": "http://json-schema.org/draft-06/schema#",
|
|
9
|
-
"$id": "https://example.com/schemas/deepextending",
|
|
10
|
-
"title": "Deeply Extending",
|
|
11
|
-
"description": "This is an extending schema. It is extending another extending schema. It pulls `definitions` from other schemas.",
|
|
12
|
-
"type": "object",
|
|
13
|
-
"meta:extensible": true,
|
|
14
|
-
"meta:extends": [
|
|
15
|
-
"https://example.com/schemas/definitions",
|
|
16
|
-
"https://example.com/schemas/extensible",
|
|
17
|
-
"https://example.com/schemas/extending"
|
|
18
|
-
],
|
|
19
|
-
"definitions": {
|
|
20
|
-
"fourth": {
|
|
21
|
-
"properties": {
|
|
22
|
-
"hey": {
|
|
23
|
-
"type": "string",
|
|
24
|
-
"description": "A unique identifier given to every addressable thing.",
|
|
25
|
-
"version": "1.0.0",
|
|
26
|
-
"testProperty": "test"
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
"allOf": [
|
|
32
|
-
{ "$ref": "https://example.com/schemas/extensible#/definitions/second"},
|
|
33
|
-
{ "$ref": "https://example.com/schemas/definitions#/definitions/myid" },
|
|
34
|
-
{ "$ref": "https://example.com/schemas/extending#/definitions/third" },
|
|
35
|
-
{ "$ref": "#/definitions/fourth" }
|
|
36
|
-
]
|
|
37
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
This is an example of using a `definitions` object within a schema.
|
|
2
|
-
|
|
3
|
-
It is imported using `allOf` and `$ref`.
|
|
4
|
-
|
|
5
|
-
And the description has line breaks.
|
|
6
|
-
|
|
7
|
-
So.
|
|
8
|
-
|
|
9
|
-
Many.
|
|
10
|
-
|
|
11
|
-
Line.
|
|
12
|
-
|
|
13
|
-
Bre-
|
|
14
|
-
|
|
15
|
-
aks.
|
|
16
|
-
|
|
17
|
-
> Everything is better with a quote.
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"meta:license": [
|
|
3
|
-
"Copyright 2017 Adobe Systems Incorporated. All rights reserved.",
|
|
4
|
-
"This file is licensed to you under the Apache License, Version 2.0 (the 'License');",
|
|
5
|
-
"you may not use this file except in compliance with the License. You may obtain a copy",
|
|
6
|
-
"of the License at http://www.apache.org/licenses/LICENSE-2.0"
|
|
7
|
-
],
|
|
8
|
-
"$schema": "http://json-schema.org/draft-06/schema#",
|
|
9
|
-
"$id": "https://example.com/schemas/definitions",
|
|
10
|
-
"title": "Definitions",
|
|
11
|
-
"type": "object",
|
|
12
|
-
"definitions": {
|
|
13
|
-
"myid": {
|
|
14
|
-
"properties": {
|
|
15
|
-
"id": {
|
|
16
|
-
"type": "string",
|
|
17
|
-
"format": "uri-reference",
|
|
18
|
-
"description": "A unique identifier given to every addressable thing.",
|
|
19
|
-
"version": "1.0.0",
|
|
20
|
-
"testProperty": "test"
|
|
21
|
-
},
|
|
22
|
-
"@id": {
|
|
23
|
-
"type": "string",
|
|
24
|
-
"format": "uri",
|
|
25
|
-
"description": "An `id` with an `@` in front of it. The `@` stands for \"dot com\"",
|
|
26
|
-
"version": "1.0.0",
|
|
27
|
-
"testProperty": "test"
|
|
28
|
-
},
|
|
29
|
-
"meta:id": {
|
|
30
|
-
"type": "string",
|
|
31
|
-
"format": "email",
|
|
32
|
-
"description": "An about ids. It is meta. If you are confused, send an email to the address specified in this property value.",
|
|
33
|
-
"version": "1.0.0",
|
|
34
|
-
"testProperty": "test"
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
"required": ["@id"]
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
"allOf": [
|
|
41
|
-
{"$ref": "#/definitions/myid"}
|
|
42
|
-
],
|
|
43
|
-
"required": [
|
|
44
|
-
"id"
|
|
45
|
-
]
|
|
46
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"meta:license": [
|
|
3
|
-
"Copyright 2017 Adobe Systems Incorporated. All rights reserved.",
|
|
4
|
-
"This file is licensed to you under the Apache License, Version 2.0 (the 'License');",
|
|
5
|
-
"you may not use this file except in compliance with the License. You may obtain a copy",
|
|
6
|
-
"of the License at http://www.apache.org/licenses/LICENSE-2.0"
|
|
7
|
-
],
|
|
8
|
-
"$schema": "http://json-schema.org/draft-06/schema#",
|
|
9
|
-
"$id": "https://example.com/schemas/enums",
|
|
10
|
-
"title": "Enumerated ",
|
|
11
|
-
"type": "object",
|
|
12
|
-
"description": "This is an example schema with examples for properties with enum values",
|
|
13
|
-
"properties": {
|
|
14
|
-
"hello": {
|
|
15
|
-
"type": "string",
|
|
16
|
-
"enum": ["World", "Welt"],
|
|
17
|
-
"description": "A simple string. Pick a value.",
|
|
18
|
-
"version": "1.0.0",
|
|
19
|
-
"testProperty": "test"
|
|
20
|
-
},
|
|
21
|
-
|
|
22
|
-
"nested": {
|
|
23
|
-
"title": "Enumerated (Nested)",
|
|
24
|
-
"description": "This is an example schema with examples for properties of nested objects with enum values",
|
|
25
|
-
"type": "object",
|
|
26
|
-
"properties": {
|
|
27
|
-
"test": {
|
|
28
|
-
"type": "string",
|
|
29
|
-
"enum": ["nested", "object", "works"],
|
|
30
|
-
"description": "A simple string. Pick a value.",
|
|
31
|
-
"version": "1.0.0",
|
|
32
|
-
"testProperty": "test"
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
"version": "1.0.0",
|
|
36
|
-
"testProperty": "test"
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
"required": [
|
|
40
|
-
"hello"
|
|
41
|
-
]
|
|
42
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"meta:license": [
|
|
3
|
-
"Copyright 2017 Adobe Systems Incorporated. All rights reserved.",
|
|
4
|
-
"This file is licensed to you under the Apache License, Version 2.0 (the 'License');",
|
|
5
|
-
"you may not use this file except in compliance with the License. You may obtain a copy",
|
|
6
|
-
"of the License at http://www.apache.org/licenses/LICENSE-2.0"
|
|
7
|
-
],
|
|
8
|
-
"$schema": "http://json-schema.org/draft-06/schema#",
|
|
9
|
-
"$id": "https://example.com/schemas/example",
|
|
10
|
-
"title": "Example",
|
|
11
|
-
"type": "object",
|
|
12
|
-
"description": "This is an example schema with examples. Too many examples? There can never be too many examples!",
|
|
13
|
-
"properties": {
|
|
14
|
-
"foo": {
|
|
15
|
-
"type": "string",
|
|
16
|
-
"description": "A simple string.",
|
|
17
|
-
"examples": ["bar"],
|
|
18
|
-
"version": "1.0.0",
|
|
19
|
-
"testProperty": "test"
|
|
20
|
-
},
|
|
21
|
-
"bar": {
|
|
22
|
-
"type": "string",
|
|
23
|
-
"description": "A simple string.",
|
|
24
|
-
"examples": ["bar", "baz"],
|
|
25
|
-
"version": "1.0.0",
|
|
26
|
-
"testProperty": "test"
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"meta:license": [
|
|
3
|
-
"Copyright 2017 Adobe Systems Incorporated. All rights reserved.",
|
|
4
|
-
"This file is licensed to you under the Apache License, Version 2.0 (the 'License');",
|
|
5
|
-
"you may not use this file except in compliance with the License. You may obtain a copy",
|
|
6
|
-
"of the License at http://www.apache.org/licenses/LICENSE-2.0"
|
|
7
|
-
],
|
|
8
|
-
"$schema": "http://json-schema.org/draft-06/schema#",
|
|
9
|
-
"$id": "https://example.com/schemas/examples",
|
|
10
|
-
"title": "Examples",
|
|
11
|
-
"type": "object",
|
|
12
|
-
"description": "This is an example schema with *multiple* examples. Too many examples? There can never be too many examples!",
|
|
13
|
-
"properties": {
|
|
14
|
-
"foo": {
|
|
15
|
-
"type": "string",
|
|
16
|
-
"description": "A simple string.",
|
|
17
|
-
"examples": ["bar"],
|
|
18
|
-
"version": "1.0.0",
|
|
19
|
-
"testProperty": "test"
|
|
20
|
-
},
|
|
21
|
-
"bar": {
|
|
22
|
-
"type": "string",
|
|
23
|
-
"description": "A simple string.",
|
|
24
|
-
"examples": ["bar", "baz"],
|
|
25
|
-
"version": "1.0.0",
|
|
26
|
-
"testProperty": "test"
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
"required": [
|
|
30
|
-
"bar"
|
|
31
|
-
]
|
|
32
|
-
}
|