json_skooma 0.2.4 → 0.2.6

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.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +18 -1
  3. data/README.md +38 -0
  4. data/lib/json_skooma/formatters.rb +56 -0
  5. data/lib/json_skooma/keywords/value_schemas.rb +13 -3
  6. data/lib/json_skooma/registry.rb +14 -3
  7. data/lib/json_skooma/version.rb +1 -1
  8. metadata +17 -40
  9. data/data/draft-2019-09/README.md +0 -60
  10. data/data/draft-2019-09/hyper-schema.json +0 -26
  11. data/data/draft-2019-09/links.json +0 -91
  12. data/data/draft-2019-09/meta/applicator.json +0 -53
  13. data/data/draft-2019-09/meta/content.json +0 -14
  14. data/data/draft-2019-09/meta/core.json +0 -54
  15. data/data/draft-2019-09/meta/format.json +0 -11
  16. data/data/draft-2019-09/meta/hyper-schema.json +0 -26
  17. data/data/draft-2019-09/meta/meta-data.json +0 -34
  18. data/data/draft-2019-09/meta/validation.json +0 -95
  19. data/data/draft-2019-09/output/hyper-schema.json +0 -62
  20. data/data/draft-2019-09/output/schema.json +0 -86
  21. data/data/draft-2019-09/output/verbose-example.json +0 -130
  22. data/data/draft-2019-09/schema.json +0 -42
  23. data/data/draft-2020-12/README.md +0 -89
  24. data/data/draft-2020-12/adr/README.md +0 -15
  25. data/data/draft-2020-12/archive/hyper-schema.json +0 -28
  26. data/data/draft-2020-12/archive/links.json +0 -93
  27. data/data/draft-2020-12/archive/meta/hyper-schema.json +0 -30
  28. data/data/draft-2020-12/hyper-schema.json +0 -27
  29. data/data/draft-2020-12/links.json +0 -85
  30. data/data/draft-2020-12/meta/applicator.json +0 -45
  31. data/data/draft-2020-12/meta/content.json +0 -14
  32. data/data/draft-2020-12/meta/core.json +0 -48
  33. data/data/draft-2020-12/meta/format-annotation.json +0 -11
  34. data/data/draft-2020-12/meta/format-assertion.json +0 -11
  35. data/data/draft-2020-12/meta/hyper-schema.json +0 -26
  36. data/data/draft-2020-12/meta/meta-data.json +0 -34
  37. data/data/draft-2020-12/meta/unevaluated.json +0 -12
  38. data/data/draft-2020-12/meta/validation.json +0 -95
  39. data/data/draft-2020-12/output/hyper-schema.json +0 -62
  40. data/data/draft-2020-12/output/schema.json +0 -96
  41. data/data/draft-2020-12/output/verbose-example.json +0 -130
  42. data/data/draft-2020-12/schema.json +0 -58
@@ -1,96 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://json-schema.org/draft/2020-12/output/schema",
4
- "description": "A schema that validates the minimum requirements for validation output",
5
-
6
- "anyOf": [
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": "json-pointer"
19
- },
20
- "absoluteKeywordLocation": {
21
- "type": "string",
22
- "format": "uri"
23
- },
24
- "instanceLocation": {
25
- "type": "string",
26
- "format": "json-pointer"
27
- },
28
- "error": {
29
- "type": "string"
30
- },
31
- "errors": {
32
- "$ref": "#/$defs/outputUnitArray"
33
- },
34
- "annotations": {
35
- "$ref": "#/$defs/outputUnitArray"
36
- }
37
- },
38
- "required": [ "valid", "keywordLocation", "instanceLocation" ],
39
- "allOf": [
40
- {
41
- "if": {
42
- "properties": {
43
- "valid": { "const": false }
44
- }
45
- },
46
- "then": {
47
- "anyOf": [
48
- {
49
- "required": [ "error" ]
50
- },
51
- {
52
- "required": [ "errors" ]
53
- }
54
- ]
55
- }
56
- },
57
- {
58
- "if": {
59
- "anyOf": [
60
- {
61
- "properties": {
62
- "keywordLocation": {
63
- "pattern": "/\\$ref/"
64
- }
65
- }
66
- },
67
- {
68
- "properties": {
69
- "keywordLocation": {
70
- "pattern": "/\\$dynamicRef/"
71
- }
72
- }
73
- }
74
- ]
75
- },
76
- "then": {
77
- "required": [ "absoluteKeywordLocation" ]
78
- }
79
- }
80
- ]
81
- },
82
- "outputUnitArray": {
83
- "type": "array",
84
- "items": { "$ref": "#/$defs/outputUnit" }
85
- },
86
- "flag": {
87
- "properties": {
88
- "valid": { "type": "boolean" }
89
- },
90
- "required": [ "valid" ]
91
- },
92
- "basic": { "$ref": "#/$defs/outputUnit" },
93
- "detailed": { "$ref": "#/$defs/outputUnit" },
94
- "verbose": { "$ref": "#/$defs/outputUnit" }
95
- }
96
- }
@@ -1,130 +0,0 @@
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
- }
@@ -1,58 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://json-schema.org/draft/2020-12/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
- },
13
- "$dynamicAnchor": "meta",
14
-
15
- "title": "Core and Validation specifications meta-schema",
16
- "allOf": [
17
- {"$ref": "meta/core"},
18
- {"$ref": "meta/applicator"},
19
- {"$ref": "meta/unevaluated"},
20
- {"$ref": "meta/validation"},
21
- {"$ref": "meta/meta-data"},
22
- {"$ref": "meta/format-annotation"},
23
- {"$ref": "meta/content"}
24
- ],
25
- "type": ["object", "boolean"],
26
- "$comment": "This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",
27
- "properties": {
28
- "definitions": {
29
- "$comment": "\"definitions\" has been replaced by \"$defs\".",
30
- "type": "object",
31
- "additionalProperties": { "$dynamicRef": "#meta" },
32
- "deprecated": true,
33
- "default": {}
34
- },
35
- "dependencies": {
36
- "$comment": "\"dependencies\" has been split and replaced by \"dependentSchemas\" and \"dependentRequired\" in order to serve their differing semantics.",
37
- "type": "object",
38
- "additionalProperties": {
39
- "anyOf": [
40
- { "$dynamicRef": "#meta" },
41
- { "$ref": "meta/validation#/$defs/stringArray" }
42
- ]
43
- },
44
- "deprecated": true,
45
- "default": {}
46
- },
47
- "$recursiveAnchor": {
48
- "$comment": "\"$recursiveAnchor\" has been replaced by \"$dynamicAnchor\".",
49
- "$ref": "meta/core#/$defs/anchorString",
50
- "deprecated": true
51
- },
52
- "$recursiveRef": {
53
- "$comment": "\"$recursiveRef\" has been replaced by \"$dynamicRef\".",
54
- "$ref": "meta/core#/$defs/uriReferenceString",
55
- "deprecated": true
56
- }
57
- }
58
- }