@rathnasgala2/schemas 3.2.0 → 3.4.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.
- package/README.md +12 -9
- package/THIRD_PARTY_LICENSES.json +1 -1
- package/diagnostics/diagnostic-map.json +138 -0
- package/docs/catalogs/app-components.json +701 -1
- package/docs/catalogs/app-routes.json +365 -11
- package/docs/catalogs/schema-inventory.json +5 -5
- package/examples/valid/appearance/rules.json +22 -0
- package/examples/valid/build-input/rules.json +136 -0
- package/examples/valid/content-frontmatter/rules.json +108 -0
- package/fixtures/boundary/appearance/rules.json +22 -0
- package/fixtures/boundary/build-input/rules.json +136 -0
- package/fixtures/boundary/content-frontmatter/rules.json +108 -0
- package/fixtures/invalid/appearance/REQUEST_FIELD_UNKNOWN/cases.json +9 -0
- package/fixtures/invalid/appearance/SCHEMA_REQUIRED_FIELD_MISSING/cases.json +9 -0
- package/fixtures/invalid/appearance/SCHEMA_TYPE_INVALID/cases.json +20 -0
- package/fixtures/invalid/build-input/REQUEST_FIELD_UNKNOWN/cases.json +47 -0
- package/fixtures/invalid/build-input/SCHEMA_CONSTANT_INVALID/cases.json +11 -0
- package/fixtures/invalid/build-input/SCHEMA_ENUM_INVALID/cases.json +22 -0
- package/fixtures/invalid/build-input/SCHEMA_NEGATED_RULE_MATCHED/cases.json +11 -0
- package/fixtures/invalid/build-input/SCHEMA_REQUIRED_FIELD_MISSING/cases.json +173 -0
- package/fixtures/invalid/build-input/SCHEMA_TYPE_INVALID/cases.json +40 -0
- package/fixtures/invalid/content-frontmatter/REQUEST_FIELD_UNKNOWN/cases.json +38 -0
- package/fixtures/invalid/content-frontmatter/SCHEMA_CONSTANT_INVALID/cases.json +11 -0
- package/fixtures/invalid/content-frontmatter/SCHEMA_ENUM_INVALID/cases.json +22 -0
- package/fixtures/invalid/content-frontmatter/SCHEMA_NEGATED_RULE_MATCHED/cases.json +9 -0
- package/fixtures/invalid/content-frontmatter/SCHEMA_REQUIRED_FIELD_MISSING/cases.json +164 -0
- package/fixtures/invalid/content-frontmatter/SCHEMA_TYPE_INVALID/cases.json +20 -0
- package/fixtures/manifest.json +1064 -6
- package/fixtures/unknown-field/appearance/rules.json +14 -0
- package/fixtures/unknown-field/build-input/rules.json +69 -0
- package/fixtures/unknown-field/content-frontmatter/rules.json +55 -0
- package/generated/browser/validator-core.mjs +3 -3
- package/generated/typescript/contracts/appearance.d.ts +5 -0
- package/generated/typescript/contracts/build-input.d.ts +21 -2
- package/generated/typescript/contracts/content-frontmatter.d.ts +14 -1
- package/openapi/http-catalog.json +549 -9
- package/openapi/openapi.yaml +18340 -4755
- package/package.json +1 -1
- package/sbom.cdx.json +23 -23
- package/schemas/appearance.schema.json +8 -0
- package/schemas/build-input.schema.json +44 -3
- package/schemas/content-frontmatter.schema.json +32 -1
package/package.json
CHANGED
package/sbom.cdx.json
CHANGED
|
@@ -97,8 +97,8 @@
|
|
|
97
97
|
"type": "library",
|
|
98
98
|
"name": "schemas",
|
|
99
99
|
"group": "@rathnasgala2",
|
|
100
|
-
"version": "3.
|
|
101
|
-
"bom-ref": "@rathnasgala2/schemas@3.
|
|
100
|
+
"version": "3.4.0",
|
|
101
|
+
"bom-ref": "@rathnasgala2/schemas@3.4.0",
|
|
102
102
|
"description": "Executable JSON Schema and OpenAPI contracts for Galascribe",
|
|
103
103
|
"licenses": [
|
|
104
104
|
{
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
],
|
|
111
|
-
"purl": "pkg:npm/%40rathnasgala2/schemas@3.
|
|
111
|
+
"purl": "pkg:npm/%40rathnasgala2/schemas@3.4.0?vcs_url=git%2Bhttps%3A%2F%2Fgithub.com%2Frathnasgala2%2Fschema.git",
|
|
112
112
|
"externalReferences": [
|
|
113
113
|
{
|
|
114
114
|
"url": "https://github.com/rathnasgala2/schema/issues",
|
|
@@ -153,7 +153,7 @@
|
|
|
153
153
|
"type": "library",
|
|
154
154
|
"name": "ajv-formats",
|
|
155
155
|
"version": "3.0.1",
|
|
156
|
-
"bom-ref": "@rathnasgala2/schemas@3.
|
|
156
|
+
"bom-ref": "@rathnasgala2/schemas@3.4.0|ajv-formats@3.0.1",
|
|
157
157
|
"licenses": [
|
|
158
158
|
{
|
|
159
159
|
"license": {
|
|
@@ -187,7 +187,7 @@
|
|
|
187
187
|
"type": "library",
|
|
188
188
|
"name": "ajv",
|
|
189
189
|
"version": "8.20.0",
|
|
190
|
-
"bom-ref": "@rathnasgala2/schemas@3.
|
|
190
|
+
"bom-ref": "@rathnasgala2/schemas@3.4.0|ajv@8.20.0",
|
|
191
191
|
"licenses": [
|
|
192
192
|
{
|
|
193
193
|
"license": {
|
|
@@ -221,7 +221,7 @@
|
|
|
221
221
|
"type": "library",
|
|
222
222
|
"name": "fast-deep-equal",
|
|
223
223
|
"version": "3.1.3",
|
|
224
|
-
"bom-ref": "@rathnasgala2/schemas@3.
|
|
224
|
+
"bom-ref": "@rathnasgala2/schemas@3.4.0|fast-deep-equal@3.1.3",
|
|
225
225
|
"licenses": [
|
|
226
226
|
{
|
|
227
227
|
"license": {
|
|
@@ -255,7 +255,7 @@
|
|
|
255
255
|
"type": "library",
|
|
256
256
|
"name": "fast-uri",
|
|
257
257
|
"version": "3.1.8",
|
|
258
|
-
"bom-ref": "@rathnasgala2/schemas@3.
|
|
258
|
+
"bom-ref": "@rathnasgala2/schemas@3.4.0|fast-uri@3.1.8",
|
|
259
259
|
"licenses": [
|
|
260
260
|
{
|
|
261
261
|
"license": {
|
|
@@ -289,7 +289,7 @@
|
|
|
289
289
|
"type": "library",
|
|
290
290
|
"name": "json-schema-traverse",
|
|
291
291
|
"version": "1.0.0",
|
|
292
|
-
"bom-ref": "@rathnasgala2/schemas@3.
|
|
292
|
+
"bom-ref": "@rathnasgala2/schemas@3.4.0|json-schema-traverse@1.0.0",
|
|
293
293
|
"licenses": [
|
|
294
294
|
{
|
|
295
295
|
"license": {
|
|
@@ -323,7 +323,7 @@
|
|
|
323
323
|
"type": "library",
|
|
324
324
|
"name": "require-from-string",
|
|
325
325
|
"version": "2.0.2",
|
|
326
|
-
"bom-ref": "@rathnasgala2/schemas@3.
|
|
326
|
+
"bom-ref": "@rathnasgala2/schemas@3.4.0|require-from-string@2.0.2",
|
|
327
327
|
"licenses": [
|
|
328
328
|
{
|
|
329
329
|
"license": {
|
|
@@ -1064,10 +1064,10 @@
|
|
|
1064
1064
|
],
|
|
1065
1065
|
"dependencies": [
|
|
1066
1066
|
{
|
|
1067
|
-
"ref": "@rathnasgala2/schemas@3.
|
|
1067
|
+
"ref": "@rathnasgala2/schemas@3.4.0",
|
|
1068
1068
|
"dependsOn": [
|
|
1069
|
-
"@rathnasgala2/schemas@3.
|
|
1070
|
-
"@rathnasgala2/schemas@3.
|
|
1069
|
+
"@rathnasgala2/schemas@3.4.0|ajv-formats@3.0.1",
|
|
1070
|
+
"@rathnasgala2/schemas@3.4.0|ajv@8.20.0",
|
|
1071
1071
|
"pkg:npm/semver@7.8.5",
|
|
1072
1072
|
"urn:gala:source-data:iana-ipv4-special-registry",
|
|
1073
1073
|
"urn:gala:source-data:iana-ipv6-special-registry",
|
|
@@ -1089,31 +1089,31 @@
|
|
|
1089
1089
|
]
|
|
1090
1090
|
},
|
|
1091
1091
|
{
|
|
1092
|
-
"ref": "@rathnasgala2/schemas@3.
|
|
1092
|
+
"ref": "@rathnasgala2/schemas@3.4.0|ajv-formats@3.0.1",
|
|
1093
1093
|
"dependsOn": [
|
|
1094
|
-
"@rathnasgala2/schemas@3.
|
|
1094
|
+
"@rathnasgala2/schemas@3.4.0|ajv@8.20.0"
|
|
1095
1095
|
]
|
|
1096
1096
|
},
|
|
1097
1097
|
{
|
|
1098
|
-
"ref": "@rathnasgala2/schemas@3.
|
|
1098
|
+
"ref": "@rathnasgala2/schemas@3.4.0|ajv@8.20.0",
|
|
1099
1099
|
"dependsOn": [
|
|
1100
|
-
"@rathnasgala2/schemas@3.
|
|
1101
|
-
"@rathnasgala2/schemas@3.
|
|
1102
|
-
"@rathnasgala2/schemas@3.
|
|
1103
|
-
"@rathnasgala2/schemas@3.
|
|
1100
|
+
"@rathnasgala2/schemas@3.4.0|fast-deep-equal@3.1.3",
|
|
1101
|
+
"@rathnasgala2/schemas@3.4.0|fast-uri@3.1.8",
|
|
1102
|
+
"@rathnasgala2/schemas@3.4.0|json-schema-traverse@1.0.0",
|
|
1103
|
+
"@rathnasgala2/schemas@3.4.0|require-from-string@2.0.2"
|
|
1104
1104
|
]
|
|
1105
1105
|
},
|
|
1106
1106
|
{
|
|
1107
|
-
"ref": "@rathnasgala2/schemas@3.
|
|
1107
|
+
"ref": "@rathnasgala2/schemas@3.4.0|fast-deep-equal@3.1.3"
|
|
1108
1108
|
},
|
|
1109
1109
|
{
|
|
1110
|
-
"ref": "@rathnasgala2/schemas@3.
|
|
1110
|
+
"ref": "@rathnasgala2/schemas@3.4.0|fast-uri@3.1.8"
|
|
1111
1111
|
},
|
|
1112
1112
|
{
|
|
1113
|
-
"ref": "@rathnasgala2/schemas@3.
|
|
1113
|
+
"ref": "@rathnasgala2/schemas@3.4.0|json-schema-traverse@1.0.0"
|
|
1114
1114
|
},
|
|
1115
1115
|
{
|
|
1116
|
-
"ref": "@rathnasgala2/schemas@3.
|
|
1116
|
+
"ref": "@rathnasgala2/schemas@3.4.0|require-from-string@2.0.2"
|
|
1117
1117
|
},
|
|
1118
1118
|
{
|
|
1119
1119
|
"ref": "pkg:npm/semver@7.8.5"
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
"maxItems": 8
|
|
35
35
|
},
|
|
36
36
|
"tokens": { "$ref": "#/$defs/semanticTokens" },
|
|
37
|
+
"attribution": { "$ref": "#/$defs/attribution" },
|
|
37
38
|
"extensions": { "$ref": "#/$defs/extensionMap" }
|
|
38
39
|
},
|
|
39
40
|
"additionalProperties": false,
|
|
@@ -215,6 +216,13 @@
|
|
|
215
216
|
"maxProperties": 0,
|
|
216
217
|
"$comment": "Fail closed: only the documented empty object is accepted until the semantic-token catalog is accepted."
|
|
217
218
|
},
|
|
219
|
+
"attribution": {
|
|
220
|
+
"type": "object",
|
|
221
|
+
"required": ["showMadeWith"],
|
|
222
|
+
"properties": { "showMadeWith": { "type": "boolean" } },
|
|
223
|
+
"additionalProperties": false,
|
|
224
|
+
"description": "Footer attribution. `showMadeWith: false` omits the \"Made with Galascribe\" mark; an absent `attribution` means it is shown."
|
|
225
|
+
},
|
|
218
226
|
"extensionMap": {
|
|
219
227
|
"type": "object",
|
|
220
228
|
"maxProperties": 32,
|
|
@@ -761,10 +761,18 @@
|
|
|
761
761
|
"maxItems": 8
|
|
762
762
|
},
|
|
763
763
|
"tokens": { "$ref": "#/$defs/semanticTokens" },
|
|
764
|
-
"source": { "$ref": "#/$defs/normalizedSource" }
|
|
764
|
+
"source": { "$ref": "#/$defs/normalizedSource" },
|
|
765
|
+
"attribution": { "$ref": "#/$defs/attribution" }
|
|
765
766
|
},
|
|
766
767
|
"additionalProperties": false
|
|
767
768
|
},
|
|
769
|
+
"attribution": {
|
|
770
|
+
"type": "object",
|
|
771
|
+
"required": ["showMadeWith"],
|
|
772
|
+
"properties": { "showMadeWith": { "type": "boolean" } },
|
|
773
|
+
"additionalProperties": false,
|
|
774
|
+
"description": "Footer attribution. `showMadeWith: false` omits the \"Made with Galascribe\" mark; an absent `attribution` means it is shown."
|
|
775
|
+
},
|
|
768
776
|
"contentFrontmatterNormalized": {
|
|
769
777
|
"type": "object",
|
|
770
778
|
"required": [
|
|
@@ -782,7 +790,7 @@
|
|
|
782
790
|
],
|
|
783
791
|
"properties": {
|
|
784
792
|
"id": { "$ref": "#/$defs/stableId" },
|
|
785
|
-
"kind": { "enum": ["article", "page"] },
|
|
793
|
+
"kind": { "enum": ["article", "page", "edition"] },
|
|
786
794
|
"title": {
|
|
787
795
|
"$ref": "#/$defs/plainText",
|
|
788
796
|
"x-gala-graphemeLength": { "minimum": 1, "maximum": 200 }
|
|
@@ -821,12 +829,45 @@
|
|
|
821
829
|
"minItems": 0,
|
|
822
830
|
"maxItems": 32,
|
|
823
831
|
"uniqueItems": true
|
|
824
|
-
}
|
|
832
|
+
},
|
|
833
|
+
"edition": { "$ref": "#/$defs/contentEdition" }
|
|
825
834
|
},
|
|
826
835
|
"additionalProperties": false,
|
|
827
836
|
"dependentRequired": { "seriesOrder": ["series"] },
|
|
837
|
+
"allOf": [
|
|
838
|
+
{
|
|
839
|
+
"if": {
|
|
840
|
+
"properties": { "kind": { "const": "edition" } },
|
|
841
|
+
"required": ["kind"]
|
|
842
|
+
},
|
|
843
|
+
"then": { "required": ["edition"] },
|
|
844
|
+
"else": { "not": { "required": ["edition"] } }
|
|
845
|
+
}
|
|
846
|
+
],
|
|
828
847
|
"$comment": "Timestamp ordering, canonical set ordering, route derivation, and route/redirect collision rules are enforced semantically."
|
|
829
848
|
},
|
|
849
|
+
"contentEdition": {
|
|
850
|
+
"type": "object",
|
|
851
|
+
"required": ["of", "kind", "sourceDigest", "generation", "approvedAt"],
|
|
852
|
+
"properties": {
|
|
853
|
+
"of": { "$ref": "#/$defs/slug" },
|
|
854
|
+
"kind": { "enum": ["QUICK_READ", "STANDARD", "DEEP_DIVE"] },
|
|
855
|
+
"sourceDigest": { "$ref": "#/$defs/digest" },
|
|
856
|
+
"generation": {
|
|
857
|
+
"type": "object",
|
|
858
|
+
"required": ["provider", "model", "generationId"],
|
|
859
|
+
"properties": {
|
|
860
|
+
"provider": { "enum": ["anthropic"] },
|
|
861
|
+
"model": { "$ref": "#/$defs/plainLabel" },
|
|
862
|
+
"generationId": { "$ref": "#/$defs/stableId" }
|
|
863
|
+
},
|
|
864
|
+
"additionalProperties": false
|
|
865
|
+
},
|
|
866
|
+
"approvedAt": { "$ref": "#/$defs/rfc3339" }
|
|
867
|
+
},
|
|
868
|
+
"additionalProperties": false,
|
|
869
|
+
"description": "Prism edition of the article whose slug is `of`. `sourceDigest` is the digest of that article body the edition was generated from; an edition whose `sourceDigest` differs from the current article body digest is stale and is not rendered."
|
|
870
|
+
},
|
|
830
871
|
"contentBuildMediaFile": {
|
|
831
872
|
"type": "object",
|
|
832
873
|
"required": ["path", "sourceDigest", "mediaType", "byteLength"],
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"schemaId": { "const": "urn:gala:schema:content-frontmatter:2.0.0" },
|
|
23
23
|
"schemaVersion": { "const": "2.0.0" },
|
|
24
24
|
"id": { "$ref": "#/$defs/stableId" },
|
|
25
|
-
"kind": { "enum": ["article", "page"] },
|
|
25
|
+
"kind": { "enum": ["article", "page", "edition"] },
|
|
26
26
|
"title": {
|
|
27
27
|
"$ref": "#/$defs/plainText",
|
|
28
28
|
"x-gala-graphemeLength": { "minimum": 1, "maximum": 200 }
|
|
@@ -63,6 +63,7 @@
|
|
|
63
63
|
"uniqueItems": true
|
|
64
64
|
},
|
|
65
65
|
"newsletter": { "enum": ["ineligible", "eligible"] },
|
|
66
|
+
"edition": { "$ref": "#/$defs/contentEdition" },
|
|
66
67
|
"extensions": { "$ref": "#/$defs/extensionMap" }
|
|
67
68
|
},
|
|
68
69
|
"additionalProperties": false,
|
|
@@ -210,6 +211,28 @@
|
|
|
210
211
|
}
|
|
211
212
|
]
|
|
212
213
|
},
|
|
214
|
+
"contentEdition": {
|
|
215
|
+
"type": "object",
|
|
216
|
+
"required": ["of", "kind", "sourceDigest", "generation", "approvedAt"],
|
|
217
|
+
"properties": {
|
|
218
|
+
"of": { "$ref": "#/$defs/slug" },
|
|
219
|
+
"kind": { "enum": ["QUICK_READ", "STANDARD", "DEEP_DIVE"] },
|
|
220
|
+
"sourceDigest": { "$ref": "#/$defs/digest" },
|
|
221
|
+
"generation": {
|
|
222
|
+
"type": "object",
|
|
223
|
+
"required": ["provider", "model", "generationId"],
|
|
224
|
+
"properties": {
|
|
225
|
+
"provider": { "enum": ["anthropic"] },
|
|
226
|
+
"model": { "$ref": "#/$defs/plainLabel" },
|
|
227
|
+
"generationId": { "$ref": "#/$defs/stableId" }
|
|
228
|
+
},
|
|
229
|
+
"additionalProperties": false
|
|
230
|
+
},
|
|
231
|
+
"approvedAt": { "$ref": "#/$defs/rfc3339" }
|
|
232
|
+
},
|
|
233
|
+
"additionalProperties": false,
|
|
234
|
+
"description": "Prism edition of the article whose slug is `of`. `sourceDigest` is the digest of that article body the edition was generated from; an edition whose `sourceDigest` differs from the current article body digest is stale and is not rendered."
|
|
235
|
+
},
|
|
213
236
|
"extensionMap": {
|
|
214
237
|
"type": "object",
|
|
215
238
|
"maxProperties": 32,
|
|
@@ -235,6 +258,14 @@
|
|
|
235
258
|
"required": ["publishedAt"]
|
|
236
259
|
}
|
|
237
260
|
}
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
"if": {
|
|
264
|
+
"properties": { "kind": { "const": "edition" } },
|
|
265
|
+
"required": ["kind"]
|
|
266
|
+
},
|
|
267
|
+
"then": { "required": ["edition"] },
|
|
268
|
+
"else": { "not": { "required": ["edition"] } }
|
|
238
269
|
}
|
|
239
270
|
],
|
|
240
271
|
"$comment": "The content validator enforces canonical set ordering, timestamp ordering, root-kind agreement, and route/redirect collision checks."
|