json_skooma 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (141) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +22 -0
  3. data/LICENSE.txt +21 -0
  4. data/README.md +107 -0
  5. data/data/draft-2019-09/README.md +60 -0
  6. data/data/draft-2019-09/hyper-schema.json +26 -0
  7. data/data/draft-2019-09/links.json +91 -0
  8. data/data/draft-2019-09/meta/applicator.json +56 -0
  9. data/data/draft-2019-09/meta/content.json +17 -0
  10. data/data/draft-2019-09/meta/core.json +57 -0
  11. data/data/draft-2019-09/meta/format.json +14 -0
  12. data/data/draft-2019-09/meta/hyper-schema.json +29 -0
  13. data/data/draft-2019-09/meta/meta-data.json +37 -0
  14. data/data/draft-2019-09/meta/validation.json +98 -0
  15. data/data/draft-2019-09/output/hyper-schema.json +62 -0
  16. data/data/draft-2019-09/output/schema.json +86 -0
  17. data/data/draft-2019-09/output/verbose-example.json +130 -0
  18. data/data/draft-2019-09/schema.json +42 -0
  19. data/data/draft-2020-12/README.md +89 -0
  20. data/data/draft-2020-12/adr/README.md +15 -0
  21. data/data/draft-2020-12/archive/hyper-schema.json +28 -0
  22. data/data/draft-2020-12/archive/links.json +93 -0
  23. data/data/draft-2020-12/archive/meta/hyper-schema.json +30 -0
  24. data/data/draft-2020-12/hyper-schema.json +27 -0
  25. data/data/draft-2020-12/links.json +85 -0
  26. data/data/draft-2020-12/meta/applicator.json +48 -0
  27. data/data/draft-2020-12/meta/content.json +17 -0
  28. data/data/draft-2020-12/meta/core.json +51 -0
  29. data/data/draft-2020-12/meta/format-annotation.json +14 -0
  30. data/data/draft-2020-12/meta/format-assertion.json +14 -0
  31. data/data/draft-2020-12/meta/hyper-schema.json +29 -0
  32. data/data/draft-2020-12/meta/meta-data.json +37 -0
  33. data/data/draft-2020-12/meta/unevaluated.json +15 -0
  34. data/data/draft-2020-12/meta/validation.json +98 -0
  35. data/data/draft-2020-12/output/hyper-schema.json +62 -0
  36. data/data/draft-2020-12/output/schema.json +96 -0
  37. data/data/draft-2020-12/output/verbose-example.json +130 -0
  38. data/data/draft-2020-12/schema.json +58 -0
  39. data/lib/json_skooma/dialects/draft201909.rb +137 -0
  40. data/lib/json_skooma/dialects/draft202012.rb +146 -0
  41. data/lib/json_skooma/formatters.rb +135 -0
  42. data/lib/json_skooma/inflector.rb +13 -0
  43. data/lib/json_skooma/json_node.rb +100 -0
  44. data/lib/json_skooma/json_pointer.rb +79 -0
  45. data/lib/json_skooma/json_schema.rb +176 -0
  46. data/lib/json_skooma/keywords/applicator/additional_properties.rb +37 -0
  47. data/lib/json_skooma/keywords/applicator/all_of.rb +25 -0
  48. data/lib/json_skooma/keywords/applicator/any_of.rb +26 -0
  49. data/lib/json_skooma/keywords/applicator/contains.rb +31 -0
  50. data/lib/json_skooma/keywords/applicator/dependent_schemas.rb +35 -0
  51. data/lib/json_skooma/keywords/applicator/else.rb +22 -0
  52. data/lib/json_skooma/keywords/applicator/if.rb +17 -0
  53. data/lib/json_skooma/keywords/applicator/items.rb +36 -0
  54. data/lib/json_skooma/keywords/applicator/not.rb +19 -0
  55. data/lib/json_skooma/keywords/applicator/one_of.rb +35 -0
  56. data/lib/json_skooma/keywords/applicator/pattern_properties.rb +46 -0
  57. data/lib/json_skooma/keywords/applicator/prefix_items.rb +31 -0
  58. data/lib/json_skooma/keywords/applicator/properties.rb +34 -0
  59. data/lib/json_skooma/keywords/applicator/property_names.rb +25 -0
  60. data/lib/json_skooma/keywords/applicator/then.rb +22 -0
  61. data/lib/json_skooma/keywords/base.rb +74 -0
  62. data/lib/json_skooma/keywords/base_annotation.rb +12 -0
  63. data/lib/json_skooma/keywords/content/content_encoding.rb +12 -0
  64. data/lib/json_skooma/keywords/content/content_media_type.rb +12 -0
  65. data/lib/json_skooma/keywords/content/content_schema.rb +19 -0
  66. data/lib/json_skooma/keywords/core/anchor.rb +22 -0
  67. data/lib/json_skooma/keywords/core/comment.rb +12 -0
  68. data/lib/json_skooma/keywords/core/defs.rb +13 -0
  69. data/lib/json_skooma/keywords/core/dynamic_anchor.rb +22 -0
  70. data/lib/json_skooma/keywords/core/dynamic_ref.rb +67 -0
  71. data/lib/json_skooma/keywords/core/id.rb +28 -0
  72. data/lib/json_skooma/keywords/core/ref.rb +35 -0
  73. data/lib/json_skooma/keywords/core/schema.rb +26 -0
  74. data/lib/json_skooma/keywords/core/vocabulary.rb +34 -0
  75. data/lib/json_skooma/keywords/draft_2019_09/additional_items.rb +40 -0
  76. data/lib/json_skooma/keywords/draft_2019_09/items.rb +41 -0
  77. data/lib/json_skooma/keywords/draft_2019_09/recursive_anchor.rb +12 -0
  78. data/lib/json_skooma/keywords/draft_2019_09/recursive_ref.rb +46 -0
  79. data/lib/json_skooma/keywords/draft_2019_09/unevaluated_items.rb +56 -0
  80. data/lib/json_skooma/keywords/format_annotation/format.rb +27 -0
  81. data/lib/json_skooma/keywords/meta_data/default.rb +11 -0
  82. data/lib/json_skooma/keywords/meta_data/deprecated.rb +11 -0
  83. data/lib/json_skooma/keywords/meta_data/description.rb +11 -0
  84. data/lib/json_skooma/keywords/meta_data/examples.rb +11 -0
  85. data/lib/json_skooma/keywords/meta_data/read_only.rb +11 -0
  86. data/lib/json_skooma/keywords/meta_data/title.rb +11 -0
  87. data/lib/json_skooma/keywords/meta_data/write_only.rb +11 -0
  88. data/lib/json_skooma/keywords/unevaluated/unevaluated_items.rb +59 -0
  89. data/lib/json_skooma/keywords/unevaluated/unevaluated_properties.rb +43 -0
  90. data/lib/json_skooma/keywords/unknown.rb +21 -0
  91. data/lib/json_skooma/keywords/validation/const.rb +17 -0
  92. data/lib/json_skooma/keywords/validation/dependent_required.rb +24 -0
  93. data/lib/json_skooma/keywords/validation/enum.rb +19 -0
  94. data/lib/json_skooma/keywords/validation/exclusive_maximum.rb +18 -0
  95. data/lib/json_skooma/keywords/validation/exclusive_minimum.rb +18 -0
  96. data/lib/json_skooma/keywords/validation/max_contains.rb +24 -0
  97. data/lib/json_skooma/keywords/validation/max_items.rb +18 -0
  98. data/lib/json_skooma/keywords/validation/max_length.rb +18 -0
  99. data/lib/json_skooma/keywords/validation/max_properties.rb +18 -0
  100. data/lib/json_skooma/keywords/validation/maximum.rb +18 -0
  101. data/lib/json_skooma/keywords/validation/min_contains.rb +31 -0
  102. data/lib/json_skooma/keywords/validation/min_items.rb +18 -0
  103. data/lib/json_skooma/keywords/validation/min_length.rb +18 -0
  104. data/lib/json_skooma/keywords/validation/min_properties.rb +18 -0
  105. data/lib/json_skooma/keywords/validation/minimum.rb +18 -0
  106. data/lib/json_skooma/keywords/validation/multiple_of.rb +20 -0
  107. data/lib/json_skooma/keywords/validation/pattern.rb +23 -0
  108. data/lib/json_skooma/keywords/validation/required.rb +19 -0
  109. data/lib/json_skooma/keywords/validation/type.rb +26 -0
  110. data/lib/json_skooma/keywords/validation/unique_items.rb +20 -0
  111. data/lib/json_skooma/keywords/value_schemas.rb +87 -0
  112. data/lib/json_skooma/memoizable.rb +21 -0
  113. data/lib/json_skooma/metaschema.rb +32 -0
  114. data/lib/json_skooma/registry.rb +130 -0
  115. data/lib/json_skooma/result.rb +125 -0
  116. data/lib/json_skooma/sources.rb +55 -0
  117. data/lib/json_skooma/validators/base.rb +31 -0
  118. data/lib/json_skooma/validators/date.rb +18 -0
  119. data/lib/json_skooma/validators/date_time.rb +24 -0
  120. data/lib/json_skooma/validators/duration.rb +25 -0
  121. data/lib/json_skooma/validators/email.rb +36 -0
  122. data/lib/json_skooma/validators/hostname.rb +17 -0
  123. data/lib/json_skooma/validators/idn_email.rb +30 -0
  124. data/lib/json_skooma/validators/idn_hostname.rb +15 -0
  125. data/lib/json_skooma/validators/ipv4.rb +20 -0
  126. data/lib/json_skooma/validators/ipv6.rb +16 -0
  127. data/lib/json_skooma/validators/iri.rb +47 -0
  128. data/lib/json_skooma/validators/iri_reference.rb +15 -0
  129. data/lib/json_skooma/validators/json_pointer.rb +19 -0
  130. data/lib/json_skooma/validators/regex.rb +15 -0
  131. data/lib/json_skooma/validators/relative_json_pointer.rb +18 -0
  132. data/lib/json_skooma/validators/time.rb +32 -0
  133. data/lib/json_skooma/validators/uri.rb +60 -0
  134. data/lib/json_skooma/validators/uri_reference.rb +15 -0
  135. data/lib/json_skooma/validators/uri_template.rb +26 -0
  136. data/lib/json_skooma/validators/uuid.rb +15 -0
  137. data/lib/json_skooma/validators.rb +17 -0
  138. data/lib/json_skooma/version.rb +5 -0
  139. data/lib/json_skooma/vocabulary.rb +12 -0
  140. data/lib/json_skooma.rb +39 -0
  141. metadata +244 -0
@@ -0,0 +1,62 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
3
+ "$id": "https://json-schema.org/draft/2019-09/output/hyper-schema",
4
+ "title": "JSON Hyper-Schema Output",
5
+ "type": "array",
6
+ "items": {
7
+ "allOf": [
8
+ {"$ref": "https://json-schema.org/draft/2019-09/links#/$defs/noRequiredFields" }
9
+ ],
10
+ "type": "object",
11
+ "required": [
12
+ "contextUri",
13
+ "contextPointer",
14
+ "rel",
15
+ "attachmentPointer"
16
+ ],
17
+ "if": { "required": [ "hrefSchema" ] },
18
+ "then": { "required": [ "hrefInputTemplates", "hrefPrepopulatedInput" ] },
19
+ "else": { "required": [ "targetUri" ] },
20
+ "properties": {
21
+ "contextUri": {
22
+ "$comment": "The fully resolved URI of the link context, including a fragment if it is possible to construct one for the given media type and instance",
23
+ "type": "string",
24
+ "format": "uri"
25
+ },
26
+ "contextPointer": {
27
+ "$comment": "The absolute JSON Pointer to the location in the instance that is the context of the link. If the context resource supports JSON Pointer fragments, this will the string form of the identical JSON Pointer",
28
+ "type": "string",
29
+ "format": "json-pointer"
30
+ },
31
+ "rel": {
32
+ "type": "string"
33
+ },
34
+ "targetUri": {
35
+ "$comment": "The fully resolved target URI",
36
+ "type": "string",
37
+ "format": "uri"
38
+ },
39
+ "hrefInputTemplates": {
40
+ "$comment": "The list of partially resolved URI Templates, starting with \"href\", followed by applicable \"base\" values from nearest to furthest.",
41
+ "type": "array",
42
+ "items": {
43
+ "type": "string",
44
+ "format": "uri-template"
45
+ }
46
+ },
47
+ "hrefPrepopulatedInput": {
48
+ "$comment": "The initial data set to be presented with the input form when URI Template input is accepted.",
49
+ "type": "object",
50
+ "propertyNames": {
51
+ "$comment": "These are all URI Template variable names, specifically the 'varname' production from RFC 6570, Section 2.3",
52
+ "pattern": "^(?:\\w|(?:%[a-f\\d]{2}))+(?:\\.(?:\\w|(?:%[a-f\\d]{2})))*$"
53
+ }
54
+ },
55
+ "attachmentPointer": {
56
+ "$comment": "The absolute JSON Pointer, in string form, of the position to which this resolved link applies",
57
+ "type": "string",
58
+ "format": "json-pointer"
59
+ }
60
+ }
61
+ }
62
+ }
@@ -0,0 +1,86 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
3
+ "$id": "https://json-schema.org/draft/2019-09/output/schema",
4
+ "description": "A schema that validates the minimum requirements for validation output",
5
+
6
+ "oneOf": [
7
+ { "$ref": "#/$defs/flag" },
8
+ { "$ref": "#/$defs/basic" },
9
+ { "$ref": "#/$defs/detailed" },
10
+ { "$ref": "#/$defs/verbose" }
11
+ ],
12
+ "$defs": {
13
+ "outputUnit":{
14
+ "properties": {
15
+ "valid": { "type": "boolean" },
16
+ "keywordLocation": {
17
+ "type": "string",
18
+ "format": "uri-reference"
19
+ },
20
+ "absoluteKeywordLocation": {
21
+ "type": "string",
22
+ "format": "uri"
23
+ },
24
+ "instanceLocation": {
25
+ "type": "string",
26
+ "format": "uri-reference"
27
+ },
28
+ "errors": {
29
+ "$ref": "#/$defs/outputUnitArray"
30
+ },
31
+ "annotations": {
32
+ "$ref": "#/$defs/outputUnitArray"
33
+ }
34
+ },
35
+ "required": [ "valid", "keywordLocation", "instanceLocation" ],
36
+ "allOf": [
37
+ {
38
+ "if": {
39
+ "properties": {
40
+ "valid": { "const": false }
41
+ }
42
+ },
43
+ "then": {
44
+ "required": [ "errors" ]
45
+ }
46
+ },
47
+ {
48
+ "if": {
49
+ "anyOf": [
50
+ {
51
+ "properties": {
52
+ "keywordLocation": {
53
+ "pattern": "/\\$ref/"
54
+ }
55
+ }
56
+ },
57
+ {
58
+ "properties": {
59
+ "keywordLocation": {
60
+ "pattern": "/\\$recursiveRef/"
61
+ }
62
+ }
63
+ }
64
+ ]
65
+ },
66
+ "then": {
67
+ "required": [ "absoluteKeywordLocation" ]
68
+ }
69
+ }
70
+ ]
71
+ },
72
+ "outputUnitArray": {
73
+ "type": "array",
74
+ "items": { "$ref": "#/$defs/outputUnit" }
75
+ },
76
+ "flag": {
77
+ "properties": {
78
+ "valid": { "type": "boolean" }
79
+ },
80
+ "required": [ "valid" ]
81
+ },
82
+ "basic": { "$ref": "#/$defs/outputUnit" },
83
+ "detailed": { "$ref": "#/$defs/outputUnit" },
84
+ "verbose": { "$ref": "#/$defs/outputUnit" }
85
+ }
86
+ }
@@ -0,0 +1,130 @@
1
+ {
2
+ "valid": false,
3
+ "keywordLocation": "#",
4
+ "instanceLocation": "#",
5
+ "errors": [
6
+ {
7
+ "valid": true,
8
+ "keywordLocation": "#/$defs",
9
+ "instanceLocation": "#"
10
+ },
11
+ {
12
+ "valid": true,
13
+ "keywordLocation": "#/type",
14
+ "instanceLocation": "#"
15
+ },
16
+ {
17
+ "valid": false,
18
+ "keywordLocation": "#/items",
19
+ "instanceLocation": "#",
20
+ "errors": [
21
+ {
22
+ "valid": true,
23
+ "keywordLocation": "#/items/$ref",
24
+ "absoluteKeywordLocation":
25
+ "https://example.com/polygon#/items/$ref",
26
+ "instanceLocation": "#/0",
27
+ "annotations": [
28
+ {
29
+ "valid": true,
30
+ "keywordLocation": "#/items/$ref",
31
+ "absoluteKeywordLocation":
32
+ "https://example.com/polygon#/$defs/point",
33
+ "instanceLocation": "#/0",
34
+ "annotations": [
35
+ {
36
+ "valid": true,
37
+ "keywordLocation": "#/items/$ref/type",
38
+ "absoluteKeywordLocation":
39
+ "https://example.com/polygon#/$defs/point/type",
40
+ "instanceLocation": "#/0"
41
+ },
42
+ {
43
+ "valid": true,
44
+ "keywordLocation": "#/items/$ref/properties",
45
+ "absoluteKeywordLocation":
46
+ "https://example.com/polygon#/$defs/point/properties",
47
+ "instanceLocation": "#/0"
48
+ },
49
+ {
50
+ "valid": true,
51
+ "keywordLocation": "#/items/$ref/required",
52
+ "absoluteKeywordLocation":
53
+ "https://example.com/polygon#/$defs/point/required",
54
+ "instanceLocation": "#/0"
55
+ },
56
+ {
57
+ "valid": true,
58
+ "keywordLocation": "#/items/$ref/additionalProperties",
59
+ "absoluteKeywordLocation":
60
+ "https://example.com/polygon#/$defs/point/additionalProperties",
61
+ "instanceLocation": "#/0"
62
+ }
63
+ ]
64
+ }
65
+ ]
66
+ },
67
+ {
68
+ "valid": false,
69
+ "keywordLocation": "#/items/$ref",
70
+ "absoluteKeywordLocation":
71
+ "https://example.com/polygon#/items/$ref",
72
+ "instanceLocation": "#/1",
73
+ "errors": [
74
+ {
75
+ "valid": false,
76
+ "keywordLocation": "#/items/$ref",
77
+ "absoluteKeywordLocation":
78
+ "https://example.com/polygon#/$defs/point",
79
+ "instanceLocation": "#/1",
80
+ "errors": [
81
+ {
82
+ "valid": true,
83
+ "keywordLocation": "#/items/$ref/type",
84
+ "absoluteKeywordLocation":
85
+ "https://example.com/polygon#/$defs/point/type",
86
+ "instanceLocation": "#/1"
87
+ },
88
+ {
89
+ "valid": true,
90
+ "keywordLocation": "#/items/$ref/properties",
91
+ "absoluteKeywordLocation":
92
+ "https://example.com/polygon#/$defs/point/properties",
93
+ "instanceLocation": "#/1"
94
+ },
95
+ {
96
+ "valid": false,
97
+ "keywordLocation": "#/items/$ref/required",
98
+ "absoluteKeywordLocation":
99
+ "https://example.com/polygon#/$defs/point/required",
100
+ "instanceLocation": "#/1"
101
+ },
102
+ {
103
+ "valid": false,
104
+ "keywordLocation": "#/items/$ref/additionalProperties",
105
+ "absoluteKeywordLocation":
106
+ "https://example.com/polygon#/$defs/point/additionalProperties",
107
+ "instanceLocation": "#/1",
108
+ "errors": [
109
+ {
110
+ "valid": false,
111
+ "keywordLocation": "#/items/$ref/additionalProperties",
112
+ "absoluteKeywordLocation":
113
+ "https://example.com/polygon#/$defs/point/additionalProperties",
114
+ "instanceLocation": "#/1/z"
115
+ }
116
+ ]
117
+ }
118
+ ]
119
+ }
120
+ ]
121
+ }
122
+ ]
123
+ },
124
+ {
125
+ "valid": false,
126
+ "keywordLocation": "#/minItems",
127
+ "instanceLocation": "#"
128
+ }
129
+ ]
130
+ }
@@ -0,0 +1,42 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
3
+ "$id": "https://json-schema.org/draft/2019-09/schema",
4
+ "$vocabulary": {
5
+ "https://json-schema.org/draft/2019-09/vocab/core": true,
6
+ "https://json-schema.org/draft/2019-09/vocab/applicator": true,
7
+ "https://json-schema.org/draft/2019-09/vocab/validation": true,
8
+ "https://json-schema.org/draft/2019-09/vocab/meta-data": true,
9
+ "https://json-schema.org/draft/2019-09/vocab/format": false,
10
+ "https://json-schema.org/draft/2019-09/vocab/content": true
11
+ },
12
+ "$recursiveAnchor": true,
13
+
14
+ "title": "Core and Validation specifications meta-schema",
15
+ "allOf": [
16
+ {"$ref": "meta/core"},
17
+ {"$ref": "meta/applicator"},
18
+ {"$ref": "meta/validation"},
19
+ {"$ref": "meta/meta-data"},
20
+ {"$ref": "meta/format"},
21
+ {"$ref": "meta/content"}
22
+ ],
23
+ "type": ["object", "boolean"],
24
+ "properties": {
25
+ "definitions": {
26
+ "$comment": "While no longer an official keyword as it is replaced by $defs, this keyword is retained in the meta-schema to prevent incompatible extensions as it remains in common use.",
27
+ "type": "object",
28
+ "additionalProperties": { "$recursiveRef": "#" },
29
+ "default": {}
30
+ },
31
+ "dependencies": {
32
+ "$comment": "\"dependencies\" is no longer a keyword, but schema authors should avoid redefining it to facilitate a smooth transition to \"dependentSchemas\" and \"dependentRequired\"",
33
+ "type": "object",
34
+ "additionalProperties": {
35
+ "anyOf": [
36
+ { "$recursiveRef": "#" },
37
+ { "$ref": "meta/validation#/$defs/stringArray" }
38
+ ]
39
+ }
40
+ }
41
+ }
42
+ }
@@ -0,0 +1,89 @@
1
+ # Welcome to JSON Schema
2
+ [![Financial Contributors on Open Collective](https://opencollective.com/json-schema/all/badge.svg?label=financial+contributors)](https://opencollective.com/json-schema)
3
+
4
+ JSON Schema is a vocabulary that allows you to validate, annotate, and manipulate JSON documents.
5
+
6
+ This repository contains the sources for the **work in progress** of the next set of JSON Schema IETF Internet Draft (I-D) documents.
7
+ For the latest released I-Ds, please see the [Specification page](http://json-schema.org/documentation.html) on the website.
8
+
9
+ ## Call for contributions and feedback
10
+
11
+ Reviews, comments and suggestions are most welcome!
12
+ Please read our [guidelines for contributing](CONTRIBUTING.md).
13
+
14
+ ## Status
15
+ For the current status of issues and pull requests, please see the following labels
16
+
17
+ [![Available](https://img.shields.io/github/issues/json-schema-org/json-schema-spec/Status:%20Available.svg?color=brightgreen)](https://github.com/json-schema-org/json-schema-spec/issues?q=is%3Aopen+is%3Aissue+label%3A%22Status%3A+Available%22) [![In Progress](https://img.shields.io/github/issues/json-schema-org/json-schema-spec/Status:%20In%20Progress.svg)](https://github.com/json-schema-org/json-schema-spec/labels/Status:%20In%20Progress) [![Review Needed](https://img.shields.io/github/issues/json-schema-org/json-schema-spec/Status:%20Review%20Needed.svg)](https://github.com/json-schema-org/json-schema-spec/labels/Status%3A%20Review%20Needed)
18
+
19
+ [![Critical](https://img.shields.io/github/issues/json-schema-org/json-schema-spec/Priority:%20Critical.svg?color=critical
20
+ )](https://github.com/json-schema-org/json-schema-spec/labels/Priority%3A%20Critical) [![High](https://img.shields.io/github/issues/json-schema-org/json-schema-spec/Priority:%20High.svg?color=important)](https://github.com/json-schema-org/json-schema-spec/labels/Priority%3A%20High) [![Medium](https://img.shields.io/github/issues/json-schema-org/json-schema-spec/Priority:%20Medium.svg)](https://github.com/json-schema-org/json-schema-spec/labels/Priority%3A%20Medium) [![Low](https://img.shields.io/github/issues/json-schema-org/json-schema-spec/Priority:%20Low.svg)](https://github.com/json-schema-org/json-schema-spec/labels/Priority%3A%20Low)
21
+
22
+
23
+ Labels are assigned based on [Sensible Github Labels](https://github.com/Relequestual/sensible-github-labels).
24
+
25
+ ## Contents
26
+
27
+ * Makefile - scripts to build the Internet-Draft txt/html
28
+ * _Internet-Draft sources_
29
+ * jsonschema-core.xml - source for JSON Schema's "core" I-D
30
+ * jsonschema-validation.xml - source for the validation vocabulary I-D
31
+ * relative-json-pointer.xml - source for the Relative JSON Pointer I-D
32
+ * _meta-schemas and recommended output formats_
33
+ * schema.json - JSON Schema "core" and Validation meta-schema
34
+ * hyper-schema.json - JSON Hyper-Schema meta-schema
35
+ * links.json - JSON Hyper-Schema's Link Description Object meta-schema
36
+ * hyper-schema-output.json - The recommended output format for JSON Hyper-Schema links
37
+
38
+ Type "make" at a shell to build the .txt and .html spec files.
39
+
40
+ Descriptions of the xml2rfc, I-D documents, and RFC processes:
41
+
42
+ * https://xml2rfc.tools.ietf.org/authoring/draft-mrose-writing-rfcs.html
43
+ * https://www.ietf.org/tao.html
44
+ * https://www.ietf.org/ietf-ftp/1id-guidelines.html
45
+ * https://www.rfc-editor.org/rfc/rfc7322.txt
46
+
47
+ ## Test suites
48
+
49
+ Conformance tests for JSON Schema and its vocabularies may be found
50
+ [in their own repository](https://github.com/json-schema-org/JSON-Schema-Test-Suite).
51
+
52
+ ## The website
53
+
54
+ The JSON Schema web site is at http://json-schema.org/
55
+
56
+ The source for the website is [maintained in a separate repository](https://github.com/json-schema-org/json-schema-org.github.io).
57
+
58
+ ## Contributors
59
+
60
+ ### Code Contributors
61
+
62
+ This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].
63
+ <a href="https://github.com/json-schema-org/json-schema-spec/graphs/contributors"><img src="https://opencollective.com/json-schema/contributors.svg?width=890&button=false" /></a>
64
+
65
+ ### Financial Contributors
66
+
67
+ Become a financial contributor and help us sustain our community. [[Contribute](https://opencollective.com/json-schema/contribute)]
68
+ #### Sponsors
69
+
70
+ Here are our top sponsors. You could be next! [[Become a sponsor](https://opencollective.com/json-schema#sponsor)]
71
+
72
+ <a href="https://opencollective.com/json-schema/sponsor/0/website" target="_blank"><img src="https://opencollective.com/json-schema/sponsor/0/avatar.svg"></a>
73
+ <a href="https://opencollective.com/json-schema/sponsor/1/website" target="_blank"><img src="https://opencollective.com/json-schema/sponsor/1/avatar.svg"></a>
74
+ <a href="https://opencollective.com/json-schema/sponsor/2/website" target="_blank"><img src="https://opencollective.com/json-schema/sponsor/2/avatar.svg"></a>
75
+ <a href="https://opencollective.com/json-schema/sponsor/3/website" target="_blank"><img src="https://opencollective.com/json-schema/sponsor/3/avatar.svg"></a>
76
+ <a href="https://opencollective.com/json-schema/sponsor/4/website" target="_blank"><img src="https://opencollective.com/json-schema/sponsor/4/avatar.svg"></a>
77
+ <a href="https://opencollective.com/json-schema/sponsor/5/website" target="_blank"><img src="https://opencollective.com/json-schema/sponsor/5/avatar.svg"></a>
78
+ <a href="https://opencollective.com/json-schema/sponsor/6/website" target="_blank"><img src="https://opencollective.com/json-schema/sponsor/6/avatar.svg"></a>
79
+ <a href="https://opencollective.com/json-schema/sponsor/7/website" target="_blank"><img src="https://opencollective.com/json-schema/sponsor/7/avatar.svg"></a>
80
+ <a href="https://opencollective.com/json-schema/sponsor/8/website" target="_blank"><img src="https://opencollective.com/json-schema/sponsor/8/avatar.svg"></a>
81
+ <a href="https://opencollective.com/json-schema/sponsor/9/website" target="_blank"><img src="https://opencollective.com/json-schema/sponsor/9/avatar.svg"></a>
82
+
83
+ #### Individuals
84
+
85
+ <a href="https://opencollective.com/json-schema"><img src="https://opencollective.com/json-schema/individuals.svg?width=890"></a>
86
+
87
+ ## License
88
+
89
+ The source material in this repository is licensed under the AFL or BSD license.
@@ -0,0 +1,15 @@
1
+ # Architectural Decision Log
2
+
3
+ This log lists the architectural decisions for the JSON Schema specification.
4
+
5
+ <!-- adrlog -- Regenerate the content by using "adr-log -i". You can install it via "npm install -g adr-log" -->
6
+
7
+ * [ADR-2022-04-08](2022-04-08-cref-for-ambiguity-and-fix-later-gh-spec-issue-1172.md) - Acknowledge ambiguity in additionalProperties behaviour and fix after patch release
8
+
9
+ <!-- adrlogstop -->
10
+
11
+ You can find the ADR for using ADRs in our [community repo ADR log](https://github.com/json-schema-org/community/tree/HEAD/docs/adr).
12
+
13
+ For new ADRs, please use [template.md](template.md) as basis.
14
+ More information on MADR is available at <https://adr.github.io/madr/>.
15
+ General information about architectural decision records is available at <https://adr.github.io/>.
@@ -0,0 +1,28 @@
1
+ {
2
+ "$comment": "This file represents a work in progress and may not be a complete or valid 2019-09 / 2020-12 schema or vocabulary",
3
+ "$schema": "https://json-schema.org/draft/2019-09/hyper-schema",
4
+ "$id": "https://json-schema.org/draft/2019-09/hyper-schema",
5
+ "$vocabulary": {
6
+ "https://json-schema.org/draft/2019-09/vocab/core": true,
7
+ "https://json-schema.org/draft/2019-09/vocab/applicator": true,
8
+ "https://json-schema.org/draft/2019-09/vocab/unevaluated": true,
9
+ "https://json-schema.org/draft/2019-09/vocab/validation": true,
10
+ "https://json-schema.org/draft/2019-09/vocab/meta-data": true,
11
+ "https://json-schema.org/draft/2019-09/vocab/format": false,
12
+ "https://json-schema.org/draft/2019-09/vocab/content": true,
13
+ "https://json-schema.org/draft/2019-09/vocab/hyper-schema": true
14
+ },
15
+ "$dynamicAnchor": "meta",
16
+
17
+ "title": "JSON Hyper-Schema",
18
+ "allOf": [
19
+ {"$ref": "https://json-schema.org/draft/2019-09/schema"},
20
+ {"$ref": "https://json-schema.org/draft/2019-09/meta/hyper-schema"}
21
+ ],
22
+ "links": [
23
+ {
24
+ "rel": "self",
25
+ "href": "{+%24id}"
26
+ }
27
+ ]
28
+ }
@@ -0,0 +1,93 @@
1
+ {
2
+ "$comment": "This file represents a work in progress and may not be a complete or valid 2019-09 / 2020-12 schema or vocabulary",
3
+ "$schema": "https://json-schema.org/draft/2019-09/hyper-schema",
4
+ "$id": "https://json-schema.org/draft/2019-09/links",
5
+ "title": "Link Description Object",
6
+
7
+ "allOf": [
8
+ { "required": [ "rel", "href" ] },
9
+ { "$ref": "#/$defs/noRequiredFields" }
10
+ ],
11
+ "$defs": {
12
+ "noRequiredFields": {
13
+ "type": "object",
14
+ "properties": {
15
+ "anchor": {
16
+ "type": "string",
17
+ "format": "uri-template"
18
+ },
19
+ "anchorPointer": {
20
+ "type": "string",
21
+ "anyOf": [
22
+ { "format": "json-pointer" },
23
+ { "format": "relative-json-pointer" }
24
+ ]
25
+ },
26
+ "rel": {
27
+ "anyOf": [
28
+ { "type": "string" },
29
+ {
30
+ "type": "array",
31
+ "items": { "type": "string" },
32
+ "minItems": 1
33
+ }
34
+ ]
35
+ },
36
+ "href": {
37
+ "type": "string",
38
+ "format": "uri-template"
39
+ },
40
+ "hrefSchema": {
41
+ "$dynamicRef": "https://json-schema.org/draft/2019-09/hyper-schema#meta",
42
+ "default": false
43
+ },
44
+ "templatePointers": {
45
+ "type": "object",
46
+ "additionalProperties": {
47
+ "type": "string",
48
+ "anyOf": [
49
+ { "format": "json-pointer" },
50
+ { "format": "relative-json-pointer" }
51
+ ]
52
+ }
53
+ },
54
+ "templateRequired": {
55
+ "type": "array",
56
+ "items": {
57
+ "type": "string"
58
+ },
59
+ "uniqueItems": true
60
+ },
61
+ "title": {
62
+ "type": "string"
63
+ },
64
+ "description": {
65
+ "type": "string"
66
+ },
67
+ "targetSchema": {
68
+ "$dynamicRef": "https://json-schema.org/draft/2019-09/hyper-schema#meta",
69
+ "default": true
70
+ },
71
+ "targetMediaType": {
72
+ "type": "string"
73
+ },
74
+ "targetHints": { },
75
+ "headerSchema": {
76
+ "$dynamicRef": "https://json-schema.org/draft/2019-09/hyper-schema#meta",
77
+ "default": true
78
+ },
79
+ "submissionMediaType": {
80
+ "type": "string",
81
+ "default": "application/json"
82
+ },
83
+ "submissionSchema": {
84
+ "$dynamicRef": "https://json-schema.org/draft/2019-09/hyper-schema#meta",
85
+ "default": true
86
+ },
87
+ "$comment": {
88
+ "type": "string"
89
+ }
90
+ }
91
+ }
92
+ }
93
+ }
@@ -0,0 +1,30 @@
1
+ {
2
+ "$comment": "This file represents a work in progress and may not be a complete or valid 2019-09 / 2020-12 schema or vocabulary",
3
+ "$schema": "https://json-schema.org/draft/2019-09/hyper-schema",
4
+ "$id": "https://json-schema.org/draft/2019-09/meta/hyper-schema",
5
+ "$vocabulary": {
6
+ "https://json-schema.org/draft/2019-09/vocab/hyper-schema": true
7
+ },
8
+ "$dynamicAnchor": "meta",
9
+
10
+ "title": "JSON Hyper-Schema Vocabulary Schema",
11
+ "type": ["object", "boolean"],
12
+ "properties": {
13
+ "base": {
14
+ "type": "string",
15
+ "format": "uri-template"
16
+ },
17
+ "links": {
18
+ "type": "array",
19
+ "items": {
20
+ "$ref": "https://json-schema.org/draft/2019-09/links"
21
+ }
22
+ }
23
+ },
24
+ "links": [
25
+ {
26
+ "rel": "self",
27
+ "href": "{+%24id}"
28
+ }
29
+ ]
30
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/hyper-schema",
3
+ "$id": "https://json-schema.org/draft/2020-12/hyper-schema",
4
+ "$vocabulary": {
5
+ "https://json-schema.org/draft/2020-12/vocab/core": true,
6
+ "https://json-schema.org/draft/2020-12/vocab/applicator": true,
7
+ "https://json-schema.org/draft/2020-12/vocab/unevaluated": true,
8
+ "https://json-schema.org/draft/2020-12/vocab/validation": true,
9
+ "https://json-schema.org/draft/2020-12/vocab/meta-data": true,
10
+ "https://json-schema.org/draft/2020-12/vocab/format-annotation": true,
11
+ "https://json-schema.org/draft/2020-12/vocab/content": true,
12
+ "https://json-schema.org/draft/2019-09/vocab/hyper-schema": true
13
+ },
14
+ "$dynamicAnchor": "meta",
15
+
16
+ "title": "JSON Hyper-Schema",
17
+ "allOf": [
18
+ { "$ref": "https://json-schema.org/draft/2020-12/schema" },
19
+ { "$ref": "https://json-schema.org/draft/2020-12/meta/hyper-schema" }
20
+ ],
21
+ "links": [
22
+ {
23
+ "rel": "self",
24
+ "href": "{+%24id}"
25
+ }
26
+ ]
27
+ }