@rathnasgala2/schemas 2.21.0 → 3.0.0

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 (51) hide show
  1. package/README.md +31 -30
  2. package/THIRD_PARTY_LICENSES.json +3 -3
  3. package/diagnostics/diagnostic-map.json +706 -4
  4. package/docs/catalogs/app-components.json +1107 -1
  5. package/docs/catalogs/app-routes.json +444 -1
  6. package/docs/catalogs/schema-inventory.json +5 -5
  7. package/examples/valid/build-input/rules.json +50 -0
  8. package/examples/valid/publication/rules.json +48 -0
  9. package/examples/valid/theme-contract/canonical.json +355 -19
  10. package/examples/valid/theme-contract/default-3.0.json +660 -0
  11. package/examples/valid/theme-contract/rules.json +3456 -552
  12. package/fixtures/boundary/build-input/rules.json +55 -0
  13. package/fixtures/boundary/publication/rules.json +53 -0
  14. package/fixtures/boundary/theme-contract/root.json +355 -19
  15. package/fixtures/boundary/theme-contract/rules.json +4158 -1226
  16. package/fixtures/invalid/build-input/GRAPHEME_LENGTH_INVALID/cases.json +11 -0
  17. package/fixtures/invalid/build-input/REQUEST_FIELD_UNKNOWN/cases.json +27 -0
  18. package/fixtures/invalid/build-input/SCHEMA_ENUM_INVALID/cases.json +11 -0
  19. package/fixtures/invalid/build-input/SCHEMA_REQUIRED_FIELD_MISSING/cases.json +50 -0
  20. package/fixtures/invalid/build-input/SCHEMA_TYPE_INVALID/cases.json +22 -0
  21. package/fixtures/invalid/publication/GRAPHEME_LENGTH_INVALID/cases.json +11 -0
  22. package/fixtures/invalid/publication/REQUEST_FIELD_UNKNOWN/cases.json +23 -0
  23. package/fixtures/invalid/publication/SCHEMA_ENUM_INVALID/cases.json +9 -0
  24. package/fixtures/invalid/publication/SCHEMA_REQUIRED_FIELD_MISSING/cases.json +42 -0
  25. package/fixtures/invalid/publication/SCHEMA_TYPE_INVALID/cases.json +18 -0
  26. package/fixtures/invalid/theme-contract/REQUEST_FIELD_UNKNOWN/cases.json +421 -20
  27. package/fixtures/invalid/theme-contract/SCHEMA_ARRAY_TOO_LONG/cases.json +2 -2
  28. package/fixtures/invalid/theme-contract/SCHEMA_ARRAY_TOO_SHORT/cases.json +1 -1
  29. package/fixtures/invalid/theme-contract/SCHEMA_CONSTANT_INVALID/cases.json +2155 -296
  30. package/fixtures/invalid/theme-contract/SCHEMA_ENUM_INVALID/cases.json +229 -9
  31. package/fixtures/invalid/theme-contract/SCHEMA_PATTERN_INVALID/cases.json +176 -0
  32. package/fixtures/invalid/theme-contract/SCHEMA_REQUIRED_FIELD_MISSING/cases.json +8812 -1517
  33. package/fixtures/invalid/theme-contract/SCHEMA_STRING_TOO_LONG/cases.json +22 -0
  34. package/fixtures/manifest.json +5543 -161
  35. package/fixtures/s2/manifest.json +1 -1
  36. package/fixtures/s2/theme-contracts-digest-cycle.json +888 -36
  37. package/fixtures/unknown-field/build-input/rules.json +35 -0
  38. package/fixtures/unknown-field/publication/rules.json +35 -0
  39. package/fixtures/unknown-field/theme-contract/root.json +355 -19
  40. package/fixtures/unknown-field/theme-contract/rules.json +637 -22
  41. package/generated/browser/validator-core.mjs +3 -3
  42. package/generated/typescript/contracts/build-input.d.ts +8 -0
  43. package/generated/typescript/contracts/publication.d.ts +12 -0
  44. package/generated/typescript/contracts/theme-contract.d.ts +529 -9
  45. package/openapi/http-catalog.json +40 -2
  46. package/openapi/openapi.yaml +1348 -162
  47. package/package.json +1 -1
  48. package/sbom.cdx.json +23 -23
  49. package/schemas/build-input.schema.json +19 -0
  50. package/schemas/publication.schema.json +21 -0
  51. package/schemas/theme-contract.schema.json +1178 -83
@@ -98,6 +98,17 @@
98
98
  "recipe": { "kind": "repeat-string", "value": "a", "count": 121 },
99
99
  "expectedCodes": ["GRAPHEME_LENGTH_INVALID"]
100
100
  },
101
+ {
102
+ "caseId": "build-input-invalid-a17ac85530e1588e",
103
+ "coveredRuleIds": [
104
+ "build-input:#/$defs/publicationNormalized/properties/newsletter/properties/text:x-gala-graphemeLength"
105
+ ],
106
+ "schemaId": "urn:gala:schema:build-input:2.0.0",
107
+ "schemaPointer": "#/$defs/publicationNormalized/properties/newsletter/properties/text",
108
+ "keyword": "x-gala-graphemeLength",
109
+ "recipe": { "kind": "repeat-string", "value": "a", "count": 301 },
110
+ "expectedCodes": ["GRAPHEME_LENGTH_INVALID"]
111
+ },
101
112
  {
102
113
  "caseId": "build-input-invalid-a5de27eba0f13731",
103
114
  "coveredRuleIds": [
@@ -10,6 +10,17 @@
10
10
  "instance": { "unexpected": true },
11
11
  "expectedCodes": ["REQUEST_FIELD_UNKNOWN"]
12
12
  },
13
+ {
14
+ "caseId": "build-input-invalid-13698720f3c60b26",
15
+ "coveredRuleIds": [
16
+ "build-input:#/$defs/publicationNormalized/properties/crawlers:additionalProperties"
17
+ ],
18
+ "schemaId": "urn:gala:schema:build-input:2.0.0",
19
+ "schemaPointer": "#/$defs/publicationNormalized/properties/crawlers",
20
+ "keyword": "additionalProperties",
21
+ "instance": { "ai": "allow", "unexpected": true },
22
+ "expectedCodes": ["REQUEST_FIELD_UNKNOWN"]
23
+ },
13
24
  {
14
25
  "caseId": "build-input-invalid-1857e60422cdd37d",
15
26
  "coveredRuleIds": [
@@ -231,6 +242,22 @@
231
242
  },
232
243
  "expectedCodes": ["REQUEST_FIELD_UNKNOWN"]
233
244
  },
245
+ {
246
+ "caseId": "build-input-invalid-5f914f6e417eae91",
247
+ "coveredRuleIds": [
248
+ "build-input:#/$defs/publicationNormalized/properties/newsletter:additionalProperties"
249
+ ],
250
+ "schemaId": "urn:gala:schema:build-input:2.0.0",
251
+ "schemaPointer": "#/$defs/publicationNormalized/properties/newsletter",
252
+ "keyword": "additionalProperties",
253
+ "instance": {
254
+ "url": "https://fixture-1.example.com/",
255
+ "title": "fixture-1",
256
+ "text": "fixture-1",
257
+ "unexpected": true
258
+ },
259
+ "expectedCodes": ["REQUEST_FIELD_UNKNOWN"]
260
+ },
234
261
  {
235
262
  "caseId": "build-input-invalid-5fb2cbe20ce5ef24",
236
263
  "coveredRuleIds": [
@@ -30,6 +30,17 @@
30
30
  "instance": "__invalid_enum__",
31
31
  "expectedCodes": ["SCHEMA_ENUM_INVALID"]
32
32
  },
33
+ {
34
+ "caseId": "build-input-invalid-24c610e1d45fea08",
35
+ "coveredRuleIds": [
36
+ "build-input:#/$defs/publicationNormalized/properties/crawlers/properties/ai:enum"
37
+ ],
38
+ "schemaId": "urn:gala:schema:build-input:2.0.0",
39
+ "schemaPointer": "#/$defs/publicationNormalized/properties/crawlers/properties/ai",
40
+ "keyword": "enum",
41
+ "instance": "__invalid_enum__",
42
+ "expectedCodes": ["SCHEMA_ENUM_INVALID"]
43
+ },
33
44
  {
34
45
  "caseId": "build-input-invalid-2caa1e257695a239",
35
46
  "coveredRuleIds": [
@@ -531,6 +531,17 @@
531
531
  },
532
532
  "expectedCodes": ["SCHEMA_REQUIRED_FIELD_MISSING"]
533
533
  },
534
+ {
535
+ "caseId": "build-input-invalid-0ea21125388083ad",
536
+ "coveredRuleIds": [
537
+ "build-input:#/$defs/publicationNormalized/properties/newsletter:required:url"
538
+ ],
539
+ "schemaId": "urn:gala:schema:build-input:2.0.0",
540
+ "schemaPointer": "#/$defs/publicationNormalized/properties/newsletter",
541
+ "keyword": "required",
542
+ "instance": { "title": "fixture-1", "text": "fixture-1" },
543
+ "expectedCodes": ["SCHEMA_REQUIRED_FIELD_MISSING"]
544
+ },
534
545
  {
535
546
  "caseId": "build-input-invalid-0f00934b4650a00f",
536
547
  "coveredRuleIds": ["build-input:#:required:inputDigest"],
@@ -748,6 +759,20 @@
748
759
  "instance": {},
749
760
  "expectedCodes": ["SCHEMA_REQUIRED_FIELD_MISSING"]
750
761
  },
762
+ {
763
+ "caseId": "build-input-invalid-0f88336d55950a8f",
764
+ "coveredRuleIds": [
765
+ "build-input:#/$defs/publicationNormalized/properties/newsletter:required:text"
766
+ ],
767
+ "schemaId": "urn:gala:schema:build-input:2.0.0",
768
+ "schemaPointer": "#/$defs/publicationNormalized/properties/newsletter",
769
+ "keyword": "required",
770
+ "instance": {
771
+ "url": "https://fixture-1.example.com/",
772
+ "title": "fixture-1"
773
+ },
774
+ "expectedCodes": ["SCHEMA_REQUIRED_FIELD_MISSING"]
775
+ },
751
776
  {
752
777
  "caseId": "build-input-invalid-12231956486980db",
753
778
  "coveredRuleIds": [
@@ -3553,6 +3578,17 @@
3553
3578
  },
3554
3579
  "expectedCodes": ["SCHEMA_REQUIRED_FIELD_MISSING"]
3555
3580
  },
3581
+ {
3582
+ "caseId": "build-input-invalid-9d6bf3c283842ebe",
3583
+ "coveredRuleIds": [
3584
+ "build-input:#/$defs/publicationNormalized/properties/crawlers:required:ai"
3585
+ ],
3586
+ "schemaId": "urn:gala:schema:build-input:2.0.0",
3587
+ "schemaPointer": "#/$defs/publicationNormalized/properties/crawlers",
3588
+ "keyword": "required",
3589
+ "instance": {},
3590
+ "expectedCodes": ["SCHEMA_REQUIRED_FIELD_MISSING"]
3591
+ },
3556
3592
  {
3557
3593
  "caseId": "build-input-invalid-9e441c1207ade38c",
3558
3594
  "coveredRuleIds": ["build-input:#/$defs/socialLink:required:uri"],
@@ -5278,6 +5314,20 @@
5278
5314
  },
5279
5315
  "expectedCodes": ["SCHEMA_REQUIRED_FIELD_MISSING"]
5280
5316
  },
5317
+ {
5318
+ "caseId": "build-input-invalid-edb92153dcc6d08c",
5319
+ "coveredRuleIds": [
5320
+ "build-input:#/$defs/publicationNormalized/properties/newsletter:required:title"
5321
+ ],
5322
+ "schemaId": "urn:gala:schema:build-input:2.0.0",
5323
+ "schemaPointer": "#/$defs/publicationNormalized/properties/newsletter",
5324
+ "keyword": "required",
5325
+ "instance": {
5326
+ "url": "https://fixture-1.example.com/",
5327
+ "text": "fixture-1"
5328
+ },
5329
+ "expectedCodes": ["SCHEMA_REQUIRED_FIELD_MISSING"]
5330
+ },
5281
5331
  {
5282
5332
  "caseId": "build-input-invalid-ee866b428328a588",
5283
5333
  "coveredRuleIds": ["build-input:#/$defs/buildPackages:required:schemas"],
@@ -46,6 +46,17 @@
46
46
  "instance": {},
47
47
  "expectedCodes": ["SCHEMA_TYPE_INVALID"]
48
48
  },
49
+ {
50
+ "caseId": "build-input-invalid-0982eee00e4a01c3",
51
+ "coveredRuleIds": [
52
+ "build-input:#/$defs/publicationNormalized/properties/newsletter:type"
53
+ ],
54
+ "schemaId": "urn:gala:schema:build-input:2.0.0",
55
+ "schemaPointer": "#/$defs/publicationNormalized/properties/newsletter",
56
+ "keyword": "type",
57
+ "instance": [],
58
+ "expectedCodes": ["SCHEMA_TYPE_INVALID"]
59
+ },
49
60
  {
50
61
  "caseId": "build-input-invalid-1052586a3a7fc768",
51
62
  "coveredRuleIds": ["build-input:#/$defs/authorNormalized:type"],
@@ -282,6 +293,17 @@
282
293
  "instance": [],
283
294
  "expectedCodes": ["SCHEMA_TYPE_INVALID"]
284
295
  },
296
+ {
297
+ "caseId": "build-input-invalid-75e9c756986e9150",
298
+ "coveredRuleIds": [
299
+ "build-input:#/$defs/publicationNormalized/properties/crawlers:type"
300
+ ],
301
+ "schemaId": "urn:gala:schema:build-input:2.0.0",
302
+ "schemaPointer": "#/$defs/publicationNormalized/properties/crawlers",
303
+ "keyword": "type",
304
+ "instance": [],
305
+ "expectedCodes": ["SCHEMA_TYPE_INVALID"]
306
+ },
285
307
  {
286
308
  "caseId": "build-input-invalid-768bf00d1fc86d6a",
287
309
  "coveredRuleIds": ["build-input:#/$defs/resolvedMedia/properties/alt:type"],
@@ -10,6 +10,17 @@
10
10
  "recipe": { "kind": "repeat-string", "value": "a", "count": 121 },
11
11
  "expectedCodes": ["GRAPHEME_LENGTH_INVALID"]
12
12
  },
13
+ {
14
+ "caseId": "publication-invalid-39884e830d86c486",
15
+ "coveredRuleIds": [
16
+ "publication:#/$defs/newsletter/properties/text:x-gala-graphemeLength"
17
+ ],
18
+ "schemaId": "urn:gala:schema:publication:2.0.0",
19
+ "schemaPointer": "#/$defs/newsletter/properties/text",
20
+ "keyword": "x-gala-graphemeLength",
21
+ "recipe": { "kind": "repeat-string", "value": "a", "count": 301 },
22
+ "expectedCodes": ["GRAPHEME_LENGTH_INVALID"]
23
+ },
13
24
  {
14
25
  "caseId": "publication-invalid-5dea17271fd0c3f3",
15
26
  "coveredRuleIds": ["publication:#/properties/title:x-gala-graphemeLength"],
@@ -14,6 +14,15 @@
14
14
  },
15
15
  "expectedCodes": ["REQUEST_FIELD_UNKNOWN"]
16
16
  },
17
+ {
18
+ "caseId": "publication-invalid-394d118377affba1",
19
+ "coveredRuleIds": ["publication:#/$defs/crawlers:additionalProperties"],
20
+ "schemaId": "urn:gala:schema:publication:2.0.0",
21
+ "schemaPointer": "#/$defs/crawlers",
22
+ "keyword": "additionalProperties",
23
+ "instance": { "ai": "allow", "unexpected": true },
24
+ "expectedCodes": ["REQUEST_FIELD_UNKNOWN"]
25
+ },
17
26
  {
18
27
  "caseId": "publication-invalid-42225461e99c1353",
19
28
  "coveredRuleIds": [
@@ -29,6 +38,20 @@
29
38
  },
30
39
  "expectedCodes": ["REQUEST_FIELD_UNKNOWN"]
31
40
  },
41
+ {
42
+ "caseId": "publication-invalid-4f13d3c552728e29",
43
+ "coveredRuleIds": ["publication:#/$defs/newsletter:additionalProperties"],
44
+ "schemaId": "urn:gala:schema:publication:2.0.0",
45
+ "schemaPointer": "#/$defs/newsletter",
46
+ "keyword": "additionalProperties",
47
+ "instance": {
48
+ "url": "https://fixture-1.example.com/",
49
+ "title": "fixture-1",
50
+ "text": "fixture-1",
51
+ "unexpected": true
52
+ },
53
+ "expectedCodes": ["REQUEST_FIELD_UNKNOWN"]
54
+ },
32
55
  {
33
56
  "caseId": "publication-invalid-96acd9544ce5c689",
34
57
  "coveredRuleIds": ["publication:#:additionalProperties"],
@@ -7,5 +7,14 @@
7
7
  "keyword": "enum",
8
8
  "instance": "__invalid_enum__",
9
9
  "expectedCodes": ["SCHEMA_ENUM_INVALID"]
10
+ },
11
+ {
12
+ "caseId": "publication-invalid-2db6268544ac7f30",
13
+ "coveredRuleIds": ["publication:#/$defs/crawlers/properties/ai:enum"],
14
+ "schemaId": "urn:gala:schema:publication:2.0.0",
15
+ "schemaPointer": "#/$defs/crawlers/properties/ai",
16
+ "keyword": "enum",
17
+ "instance": "__invalid_enum__",
18
+ "expectedCodes": ["SCHEMA_ENUM_INVALID"]
10
19
  }
11
20
  ]
@@ -65,6 +65,15 @@
65
65
  },
66
66
  "expectedCodes": ["SCHEMA_REQUIRED_FIELD_MISSING"]
67
67
  },
68
+ {
69
+ "caseId": "publication-invalid-29a76059791fbcbf",
70
+ "coveredRuleIds": ["publication:#/$defs/newsletter:required:url"],
71
+ "schemaId": "urn:gala:schema:publication:2.0.0",
72
+ "schemaPointer": "#/$defs/newsletter",
73
+ "keyword": "required",
74
+ "instance": { "title": "fixture-1", "text": "fixture-1" },
75
+ "expectedCodes": ["SCHEMA_REQUIRED_FIELD_MISSING"]
76
+ },
68
77
  {
69
78
  "caseId": "publication-invalid-312870a8bdc6845b",
70
79
  "coveredRuleIds": ["publication:#:required:defaultLanguage"],
@@ -135,6 +144,18 @@
135
144
  },
136
145
  "expectedCodes": ["SCHEMA_REQUIRED_FIELD_MISSING"]
137
146
  },
147
+ {
148
+ "caseId": "publication-invalid-69a94bbdee4a7dd9",
149
+ "coveredRuleIds": ["publication:#/$defs/newsletter:required:text"],
150
+ "schemaId": "urn:gala:schema:publication:2.0.0",
151
+ "schemaPointer": "#/$defs/newsletter",
152
+ "keyword": "required",
153
+ "instance": {
154
+ "url": "https://fixture-1.example.com/",
155
+ "title": "fixture-1"
156
+ },
157
+ "expectedCodes": ["SCHEMA_REQUIRED_FIELD_MISSING"]
158
+ },
138
159
  {
139
160
  "caseId": "publication-invalid-752edf0a79594c6b",
140
161
  "coveredRuleIds": ["publication:#:required:extensions"],
@@ -201,6 +222,27 @@
201
222
  },
202
223
  "expectedCodes": ["SCHEMA_REQUIRED_FIELD_MISSING"]
203
224
  },
225
+ {
226
+ "caseId": "publication-invalid-a25411ee83d83079",
227
+ "coveredRuleIds": ["publication:#/$defs/crawlers:required:ai"],
228
+ "schemaId": "urn:gala:schema:publication:2.0.0",
229
+ "schemaPointer": "#/$defs/crawlers",
230
+ "keyword": "required",
231
+ "instance": {},
232
+ "expectedCodes": ["SCHEMA_REQUIRED_FIELD_MISSING"]
233
+ },
234
+ {
235
+ "caseId": "publication-invalid-a8e4a3a227002a14",
236
+ "coveredRuleIds": ["publication:#/$defs/newsletter:required:title"],
237
+ "schemaId": "urn:gala:schema:publication:2.0.0",
238
+ "schemaPointer": "#/$defs/newsletter",
239
+ "keyword": "required",
240
+ "instance": {
241
+ "url": "https://fixture-1.example.com/",
242
+ "text": "fixture-1"
243
+ },
244
+ "expectedCodes": ["SCHEMA_REQUIRED_FIELD_MISSING"]
245
+ },
204
246
  {
205
247
  "caseId": "publication-invalid-ac7e949586317eaf",
206
248
  "coveredRuleIds": ["publication:#:required:title"],
@@ -1,4 +1,13 @@
1
1
  [
2
+ {
3
+ "caseId": "publication-invalid-02d6b71eb3ab9459",
4
+ "coveredRuleIds": ["publication:#/$defs/newsletter:type"],
5
+ "schemaId": "urn:gala:schema:publication:2.0.0",
6
+ "schemaPointer": "#/$defs/newsletter",
7
+ "keyword": "type",
8
+ "instance": [],
9
+ "expectedCodes": ["SCHEMA_TYPE_INVALID"]
10
+ },
2
11
  {
3
12
  "caseId": "publication-invalid-13c3a5847e92b827",
4
13
  "coveredRuleIds": ["publication:#/$defs/publicationProfile:type"],
@@ -84,6 +93,15 @@
84
93
  "instance": [],
85
94
  "expectedCodes": ["SCHEMA_TYPE_INVALID"]
86
95
  },
96
+ {
97
+ "caseId": "publication-invalid-d595eb832c5d1c45",
98
+ "coveredRuleIds": ["publication:#/$defs/crawlers:type"],
99
+ "schemaId": "urn:gala:schema:publication:2.0.0",
100
+ "schemaPointer": "#/$defs/crawlers",
101
+ "keyword": "type",
102
+ "instance": [],
103
+ "expectedCodes": ["SCHEMA_TYPE_INVALID"]
104
+ },
87
105
  {
88
106
  "caseId": "publication-invalid-d91a2e6f1e8979ce",
89
107
  "coveredRuleIds": [