artifact-chain-assistant 0.8.2 → 0.8.3

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 (80) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/.codex-plugin/plugin.json +1 -1
  3. package/CHANGELOG.md +13 -0
  4. package/INSTALL.md +10 -10
  5. package/README.md +4 -4
  6. package/README.zh-CN.md +4 -4
  7. package/adapters/claude/.claude-plugin/plugin.json +1 -1
  8. package/adapters/claude/INSTALL.md +10 -10
  9. package/adapters/claude/agent-methods/catalog.yaml +1 -1
  10. package/adapters/claude/compatibility.json +4 -4
  11. package/adapters/claude/families-src/prd-feature/implementation.yaml +39 -0
  12. package/adapters/claude/families-src/scenario-script/implementation.yaml +39 -0
  13. package/adapters/claude/family-apis/catalog.json +16 -0
  14. package/adapters/claude/family-apis/e2e-test/api.json +205 -0
  15. package/adapters/claude/family-apis/schema/family-api.schema.json +235 -0
  16. package/adapters/claude/schemas/project-facts.schema.json +80 -0
  17. package/adapters/claude/scripts/check-family-api.mjs +84 -0
  18. package/adapters/claude/scripts/export-family-api.mjs +184 -0
  19. package/adapters/claude/scripts/family-compile.mjs +309 -0
  20. package/adapters/claude/scripts/family-help-render.mjs +214 -0
  21. package/adapters/claude/scripts/lib/family-api-validator.mjs +413 -0
  22. package/adapters/claude/scripts/lib/generated/canonical-json-v1-manifest.json +7 -0
  23. package/adapters/claude/scripts/lib/generated/canonical-json-v1-vectors.generated.json +50 -0
  24. package/adapters/claude/scripts/lib/generated/canonical-json-v1.generated.mjs +130 -0
  25. package/adapters/claude/scripts/lib/generated/family-api-validator.generated.mjs +1756 -0
  26. package/adapters/claude/scripts/lib/generated/project-facts-validator.generated.mjs +638 -0
  27. package/adapters/claude/scripts/lib/generated/schema-validator-manifest.json +20 -0
  28. package/adapters/claude/scripts/lib/method-query.mjs +177 -0
  29. package/adapters/claude/scripts/method-query.mjs +67 -0
  30. package/adapters/claude/skills/setup/SKILL.md +2 -1
  31. package/adapters/codex/.codex-plugin/plugin.json +1 -1
  32. package/adapters/codex/INSTALL.md +10 -10
  33. package/adapters/codex/agent-methods/catalog.yaml +1 -1
  34. package/adapters/codex/compatibility.json +4 -4
  35. package/adapters/codex/families-src/prd-feature/implementation.yaml +39 -0
  36. package/adapters/codex/families-src/scenario-script/implementation.yaml +39 -0
  37. package/adapters/codex/family-apis/catalog.json +16 -0
  38. package/adapters/codex/family-apis/e2e-test/api.json +205 -0
  39. package/adapters/codex/family-apis/schema/family-api.schema.json +235 -0
  40. package/adapters/codex/schemas/project-facts.schema.json +80 -0
  41. package/adapters/codex/scripts/check-family-api.mjs +84 -0
  42. package/adapters/codex/scripts/export-family-api.mjs +184 -0
  43. package/adapters/codex/scripts/family-compile.mjs +309 -0
  44. package/adapters/codex/scripts/family-help-render.mjs +214 -0
  45. package/adapters/codex/scripts/lib/family-api-validator.mjs +413 -0
  46. package/adapters/codex/scripts/lib/generated/canonical-json-v1-manifest.json +7 -0
  47. package/adapters/codex/scripts/lib/generated/canonical-json-v1-vectors.generated.json +50 -0
  48. package/adapters/codex/scripts/lib/generated/canonical-json-v1.generated.mjs +130 -0
  49. package/adapters/codex/scripts/lib/generated/family-api-validator.generated.mjs +1756 -0
  50. package/adapters/codex/scripts/lib/generated/project-facts-validator.generated.mjs +638 -0
  51. package/adapters/codex/scripts/lib/generated/schema-validator-manifest.json +20 -0
  52. package/adapters/codex/scripts/lib/method-query.mjs +177 -0
  53. package/adapters/codex/scripts/method-query.mjs +67 -0
  54. package/adapters/codex/skills/setup/SKILL.md +2 -1
  55. package/agent-methods/catalog.yaml +1 -1
  56. package/compatibility.json +4 -4
  57. package/families-src/prd-feature/implementation.yaml +39 -0
  58. package/families-src/scenario-script/implementation.yaml +39 -0
  59. package/family-apis/catalog.json +16 -0
  60. package/family-apis/e2e-test/api.json +205 -0
  61. package/family-apis/schema/family-api.schema.json +235 -0
  62. package/package.json +2 -2
  63. package/schemas/project-facts.schema.json +80 -0
  64. package/scripts/check-family-api.mjs +84 -0
  65. package/scripts/export-family-api.mjs +184 -0
  66. package/scripts/family-compile.mjs +309 -0
  67. package/scripts/family-help-render.mjs +214 -0
  68. package/scripts/generate-canonical-json-protocol.mjs +75 -0
  69. package/scripts/generate-schema-validators.mjs +141 -0
  70. package/scripts/lib/family-api-validator.mjs +413 -0
  71. package/scripts/lib/generated/canonical-json-v1-manifest.json +7 -0
  72. package/scripts/lib/generated/canonical-json-v1-vectors.generated.json +50 -0
  73. package/scripts/lib/generated/canonical-json-v1.generated.mjs +130 -0
  74. package/scripts/lib/generated/family-api-validator.generated.mjs +1756 -0
  75. package/scripts/lib/generated/project-facts-validator.generated.mjs +638 -0
  76. package/scripts/lib/generated/schema-validator-manifest.json +20 -0
  77. package/scripts/lib/method-query.mjs +177 -0
  78. package/scripts/method-query.mjs +67 -0
  79. package/skills/setup/SKILL.md +2 -1
  80. package/skills-src/setup/SKILL.md +2 -1
@@ -0,0 +1,1756 @@
1
+ // This file is generated by scripts/generate-schema-validators.mjs.
2
+ // Source: family-api; schema digest: sha256:f6ec0f4ffc4a761214a3b22c909a9e7b89a63064bc2c6dad91a691ff48f6db0d; generator digest: sha256:c82a4e548f72cdfa77a72c69cca684e0fcbe6d65d4bd63485270edac8a3971f9
3
+ "use strict";
4
+ export const validate = validate10;
5
+ export default validate10;
6
+ const schema11 = {"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://artifact-chain.dev/schemas/family-api.schema.json","title":"Skill Family API","description":"Schema for standard Skill Family API definitions owned by artifact-chain-assistant","type":"object","required":["schemaVersion","api","services"],"additionalProperties":false,"properties":{"schemaVersion":{"type":"integer","const":1},"api":{"type":"object","required":["id","major","revisionDigest","displayName","summary"],"additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^artifact\\.[a-z][a-z0-9-]*-family$","description":"Canonical family API identity in the artifact.* namespace"},"major":{"type":"integer","minimum":1,"description":"Major version indicating compatibility family"},"revisionDigest":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$","description":"Immutable SHA-256 digest of canonical API content excluding this field"},"displayName":{"type":"string","minLength":1},"summary":{"type":"string","minLength":1},"artifactTypes":{"type":"array","items":{"type":"string","minLength":1},"uniqueItems":true,"description":"Artifact types this family operates on"}}},"services":{"type":"array","minItems":1,"items":{"$ref":"#/definitions/service"}},"capabilities":{"type":"array","items":{"$ref":"#/definitions/capability"},"description":"Optional public capabilities (no implementation state)"},"dataTransferObjects":{"type":"array","items":{"$ref":"#/definitions/dataTransferObject"},"description":"Family API 拥有的结构化中间或正式 DTO 声明;schema 仍由 family 提供,接口编译器只校验声明形状和服务引用。"},"qualificationKinds":{"type":"array","items":{"type":"string","pattern":"^[a-z][A-Za-z0-9]+$"},"uniqueItems":true,"description":"该 Family API 区分的资格种类名称;只声明种类,不把资格证据或成熟度写入接口。"}},"definitions":{"service":{"type":"object","required":["id","required","kind","intents"],"additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^artifact\\.[a-z][a-z0-9-]+\\.[a-z][a-z0-9-]+$","description":"Canonical service identity: artifact.<family>.<intent>"},"required":{"type":"boolean","description":"Whether this service is required for API conformance"},"kind":{"type":"string","enum":["workflow","operation"],"description":"workflow = stateful multi-step; operation = stateless single-step"},"intents":{"type":"array","minItems":1,"items":{"type":"string","enum":["default","help","author","review","repair","route","audit","generate","batch"]},"uniqueItems":true},"accepts":{"type":"array","items":{"anyOf":[{"type":"string","minLength":1},{"$ref":"#/definitions/protocolRef"}]},"description":"Input contract references or natural language descriptions"},"produces":{"type":"array","items":{"anyOf":[{"type":"string","minLength":1},{"$ref":"#/definitions/protocolRef"}]},"description":"Output contract references or natural language descriptions"},"sideEffectCeiling":{"type":"string","enum":["none","read-only","write-authorized-artifacts","write-review-result","write-project-artifacts"],"description":"Maximum side effect level this service may produce"},"mixSafe":{"type":"boolean","default":false,"description":"Whether this service can be bound to a different family implementation than other services in the same family"},"discoverable":{"type":"object","additionalProperties":false,"properties":{"default":{"type":"boolean","description":"Whether this is the default entry point"},"help":{"type":"boolean","description":"Whether this is the help entry point"}}},"modes":{"$ref":"#/definitions/serviceModes"}}},"capability":{"type":"object","required":["id","summary"],"additionalProperties":false,"properties":{"id":{"type":"string","minLength":1},"summary":{"type":"string","minLength":1}}},"serviceModes":{"type":"object","required":["supported","default"],"additionalProperties":false,"properties":{"supported":{"type":"array","minItems":1,"items":{"type":"string","pattern":"^[a-z][a-z0-9-]*$"},"uniqueItems":true},"default":{"type":"string","pattern":"^[a-z][a-z0-9-]*$"}}},"dataTransferObject":{"type":"object","required":["id","schemaId","schema","version","digestRule","services"],"additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9-]*$"},"schemaId":{"type":"string","minLength":1},"schema":{"type":"string","pattern":"^[^/\\\\~].*\\.json$"},"version":{"type":"string","minLength":1},"digestRule":{"type":"string","minLength":1},"artifactBinding":{"type":"string","minLength":1},"services":{"type":"array","items":{"type":"object","required":["service","position"],"additionalProperties":false,"properties":{"service":{"type":"string","pattern":"^artifact\\.[a-z][a-z0-9-]+\\.[a-z][a-z0-9-]+$"},"position":{"type":"string","minLength":1}}}}}},"contractRef":{"type":"string","pattern":"^[a-z][a-z0-9-]*\\.[a-z][a-z0-9-]*@[0-9]+$","description":"Artifact Contract major identity reference (e.g., artifact.e2e-test@1)"},"protocolRef":{"type":"object","required":["protocol","version"],"additionalProperties":false,"properties":{"protocol":{"type":"string","minLength":1,"description":"Protocol name when no formal Artifact Contract exists"},"version":{"type":"string","minLength":1,"description":"Protocol version"},"input":{"type":"string","description":"Describes what the protocol accepts or produces"}}}}};
7
+ const schema16 = {"type":"object","required":["id","summary"],"additionalProperties":false,"properties":{"id":{"type":"string","minLength":1},"summary":{"type":"string","minLength":1}}};
8
+ const schema17 = {"type":"object","required":["id","schemaId","schema","version","digestRule","services"],"additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9-]*$"},"schemaId":{"type":"string","minLength":1},"schema":{"type":"string","pattern":"^[^/\\\\~].*\\.json$"},"version":{"type":"string","minLength":1},"digestRule":{"type":"string","minLength":1},"artifactBinding":{"type":"string","minLength":1},"services":{"type":"array","items":{"type":"object","required":["service","position"],"additionalProperties":false,"properties":{"service":{"type":"string","pattern":"^artifact\\.[a-z][a-z0-9-]+\\.[a-z][a-z0-9-]+$"},"position":{"type":"string","minLength":1}}}}}};
9
+ const pattern0 = new RegExp("^artifact\\.[a-z][a-z0-9-]*-family$", "u");
10
+ const pattern1 = new RegExp("^sha256:[a-f0-9]{64}$", "u");
11
+ const pattern3 = new RegExp("^[a-z][a-z0-9-]*$", "u");
12
+ const pattern6 = new RegExp("^[^/\\\\~].*\\.json$", "u");
13
+ const pattern2 = new RegExp("^artifact\\.[a-z][a-z0-9-]+\\.[a-z][a-z0-9-]+$", "u");
14
+ const pattern8 = new RegExp("^[a-z][A-Za-z0-9]+$", "u");
15
+ const func2 = function ucs2length(str) {
16
+ const len = str.length;
17
+ let length = 0;
18
+ let pos = 0;
19
+ while (pos < len) {
20
+ length++;
21
+ let value = str.charCodeAt(pos++);
22
+ if (value >= 0xd800 && value <= 0xdbff && pos < len) {
23
+ value = str.charCodeAt(pos);
24
+ if ((value & 0xfc00) === 0xdc00) pos++;
25
+ }
26
+ }
27
+ return length;
28
+ };
29
+ const schema12 = {"type":"object","required":["id","required","kind","intents"],"additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^artifact\\.[a-z][a-z0-9-]+\\.[a-z][a-z0-9-]+$","description":"Canonical service identity: artifact.<family>.<intent>"},"required":{"type":"boolean","description":"Whether this service is required for API conformance"},"kind":{"type":"string","enum":["workflow","operation"],"description":"workflow = stateful multi-step; operation = stateless single-step"},"intents":{"type":"array","minItems":1,"items":{"type":"string","enum":["default","help","author","review","repair","route","audit","generate","batch"]},"uniqueItems":true},"accepts":{"type":"array","items":{"anyOf":[{"type":"string","minLength":1},{"$ref":"#/definitions/protocolRef"}]},"description":"Input contract references or natural language descriptions"},"produces":{"type":"array","items":{"anyOf":[{"type":"string","minLength":1},{"$ref":"#/definitions/protocolRef"}]},"description":"Output contract references or natural language descriptions"},"sideEffectCeiling":{"type":"string","enum":["none","read-only","write-authorized-artifacts","write-review-result","write-project-artifacts"],"description":"Maximum side effect level this service may produce"},"mixSafe":{"type":"boolean","default":false,"description":"Whether this service can be bound to a different family implementation than other services in the same family"},"discoverable":{"type":"object","additionalProperties":false,"properties":{"default":{"type":"boolean","description":"Whether this is the default entry point"},"help":{"type":"boolean","description":"Whether this is the help entry point"}}},"modes":{"$ref":"#/definitions/serviceModes"}}};
30
+ const schema13 = {"type":"object","required":["protocol","version"],"additionalProperties":false,"properties":{"protocol":{"type":"string","minLength":1,"description":"Protocol name when no formal Artifact Contract exists"},"version":{"type":"string","minLength":1,"description":"Protocol version"},"input":{"type":"string","description":"Describes what the protocol accepts or produces"}}};
31
+ const schema15 = {"type":"object","required":["supported","default"],"additionalProperties":false,"properties":{"supported":{"type":"array","minItems":1,"items":{"type":"string","pattern":"^[a-z][a-z0-9-]*$"},"uniqueItems":true},"default":{"type":"string","pattern":"^[a-z][a-z0-9-]*$"}}};
32
+ const func5 = Object.prototype.hasOwnProperty;
33
+
34
+ function validate11(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){
35
+ let vErrors = null;
36
+ let errors = 0;
37
+ if(data && typeof data == "object" && !Array.isArray(data)){
38
+ if(data.id === undefined){
39
+ const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};
40
+ if(vErrors === null){
41
+ vErrors = [err0];
42
+ }
43
+ else {
44
+ vErrors.push(err0);
45
+ }
46
+ errors++;
47
+ }
48
+ if(data.required === undefined){
49
+ const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "required"},message:"must have required property '"+"required"+"'"};
50
+ if(vErrors === null){
51
+ vErrors = [err1];
52
+ }
53
+ else {
54
+ vErrors.push(err1);
55
+ }
56
+ errors++;
57
+ }
58
+ if(data.kind === undefined){
59
+ const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "kind"},message:"must have required property '"+"kind"+"'"};
60
+ if(vErrors === null){
61
+ vErrors = [err2];
62
+ }
63
+ else {
64
+ vErrors.push(err2);
65
+ }
66
+ errors++;
67
+ }
68
+ if(data.intents === undefined){
69
+ const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "intents"},message:"must have required property '"+"intents"+"'"};
70
+ if(vErrors === null){
71
+ vErrors = [err3];
72
+ }
73
+ else {
74
+ vErrors.push(err3);
75
+ }
76
+ errors++;
77
+ }
78
+ for(const key0 in data){
79
+ if(!(func5.call(schema12.properties, key0))){
80
+ const err4 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};
81
+ if(vErrors === null){
82
+ vErrors = [err4];
83
+ }
84
+ else {
85
+ vErrors.push(err4);
86
+ }
87
+ errors++;
88
+ }
89
+ }
90
+ if(data.id !== undefined){
91
+ let data0 = data.id;
92
+ if(typeof data0 === "string"){
93
+ if(!pattern2.test(data0)){
94
+ const err5 = {instancePath:instancePath+"/id",schemaPath:"#/properties/id/pattern",keyword:"pattern",params:{pattern: "^artifact\\.[a-z][a-z0-9-]+\\.[a-z][a-z0-9-]+$"},message:"must match pattern \""+"^artifact\\.[a-z][a-z0-9-]+\\.[a-z][a-z0-9-]+$"+"\""};
95
+ if(vErrors === null){
96
+ vErrors = [err5];
97
+ }
98
+ else {
99
+ vErrors.push(err5);
100
+ }
101
+ errors++;
102
+ }
103
+ }
104
+ else {
105
+ const err6 = {instancePath:instancePath+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"};
106
+ if(vErrors === null){
107
+ vErrors = [err6];
108
+ }
109
+ else {
110
+ vErrors.push(err6);
111
+ }
112
+ errors++;
113
+ }
114
+ }
115
+ if(data.required !== undefined){
116
+ if(typeof data.required !== "boolean"){
117
+ const err7 = {instancePath:instancePath+"/required",schemaPath:"#/properties/required/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};
118
+ if(vErrors === null){
119
+ vErrors = [err7];
120
+ }
121
+ else {
122
+ vErrors.push(err7);
123
+ }
124
+ errors++;
125
+ }
126
+ }
127
+ if(data.kind !== undefined){
128
+ let data2 = data.kind;
129
+ if(typeof data2 !== "string"){
130
+ const err8 = {instancePath:instancePath+"/kind",schemaPath:"#/properties/kind/type",keyword:"type",params:{type: "string"},message:"must be string"};
131
+ if(vErrors === null){
132
+ vErrors = [err8];
133
+ }
134
+ else {
135
+ vErrors.push(err8);
136
+ }
137
+ errors++;
138
+ }
139
+ if(!((data2 === "workflow") || (data2 === "operation"))){
140
+ const err9 = {instancePath:instancePath+"/kind",schemaPath:"#/properties/kind/enum",keyword:"enum",params:{allowedValues: schema12.properties.kind.enum},message:"must be equal to one of the allowed values"};
141
+ if(vErrors === null){
142
+ vErrors = [err9];
143
+ }
144
+ else {
145
+ vErrors.push(err9);
146
+ }
147
+ errors++;
148
+ }
149
+ }
150
+ if(data.intents !== undefined){
151
+ let data3 = data.intents;
152
+ if(Array.isArray(data3)){
153
+ if(data3.length < 1){
154
+ const err10 = {instancePath:instancePath+"/intents",schemaPath:"#/properties/intents/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};
155
+ if(vErrors === null){
156
+ vErrors = [err10];
157
+ }
158
+ else {
159
+ vErrors.push(err10);
160
+ }
161
+ errors++;
162
+ }
163
+ const len0 = data3.length;
164
+ for(let i0=0; i0<len0; i0++){
165
+ let data4 = data3[i0];
166
+ if(typeof data4 !== "string"){
167
+ const err11 = {instancePath:instancePath+"/intents/" + i0,schemaPath:"#/properties/intents/items/type",keyword:"type",params:{type: "string"},message:"must be string"};
168
+ if(vErrors === null){
169
+ vErrors = [err11];
170
+ }
171
+ else {
172
+ vErrors.push(err11);
173
+ }
174
+ errors++;
175
+ }
176
+ if(!(((((((((data4 === "default") || (data4 === "help")) || (data4 === "author")) || (data4 === "review")) || (data4 === "repair")) || (data4 === "route")) || (data4 === "audit")) || (data4 === "generate")) || (data4 === "batch"))){
177
+ const err12 = {instancePath:instancePath+"/intents/" + i0,schemaPath:"#/properties/intents/items/enum",keyword:"enum",params:{allowedValues: schema12.properties.intents.items.enum},message:"must be equal to one of the allowed values"};
178
+ if(vErrors === null){
179
+ vErrors = [err12];
180
+ }
181
+ else {
182
+ vErrors.push(err12);
183
+ }
184
+ errors++;
185
+ }
186
+ }
187
+ let i1 = data3.length;
188
+ let j0;
189
+ if(i1 > 1){
190
+ const indices0 = {};
191
+ for(;i1--;){
192
+ let item0 = data3[i1];
193
+ if(typeof item0 !== "string"){
194
+ continue;
195
+ }
196
+ if(typeof indices0[item0] == "number"){
197
+ j0 = indices0[item0];
198
+ const err13 = {instancePath:instancePath+"/intents",schemaPath:"#/properties/intents/uniqueItems",keyword:"uniqueItems",params:{i: i1, j: j0},message:"must NOT have duplicate items (items ## "+j0+" and "+i1+" are identical)"};
199
+ if(vErrors === null){
200
+ vErrors = [err13];
201
+ }
202
+ else {
203
+ vErrors.push(err13);
204
+ }
205
+ errors++;
206
+ break;
207
+ }
208
+ indices0[item0] = i1;
209
+ }
210
+ }
211
+ }
212
+ else {
213
+ const err14 = {instancePath:instancePath+"/intents",schemaPath:"#/properties/intents/type",keyword:"type",params:{type: "array"},message:"must be array"};
214
+ if(vErrors === null){
215
+ vErrors = [err14];
216
+ }
217
+ else {
218
+ vErrors.push(err14);
219
+ }
220
+ errors++;
221
+ }
222
+ }
223
+ if(data.accepts !== undefined){
224
+ let data5 = data.accepts;
225
+ if(Array.isArray(data5)){
226
+ const len1 = data5.length;
227
+ for(let i2=0; i2<len1; i2++){
228
+ let data6 = data5[i2];
229
+ const _errs15 = errors;
230
+ let valid6 = false;
231
+ const _errs16 = errors;
232
+ if(typeof data6 === "string"){
233
+ if(func2(data6) < 1){
234
+ const err15 = {instancePath:instancePath+"/accepts/" + i2,schemaPath:"#/properties/accepts/items/anyOf/0/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
235
+ if(vErrors === null){
236
+ vErrors = [err15];
237
+ }
238
+ else {
239
+ vErrors.push(err15);
240
+ }
241
+ errors++;
242
+ }
243
+ }
244
+ else {
245
+ const err16 = {instancePath:instancePath+"/accepts/" + i2,schemaPath:"#/properties/accepts/items/anyOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};
246
+ if(vErrors === null){
247
+ vErrors = [err16];
248
+ }
249
+ else {
250
+ vErrors.push(err16);
251
+ }
252
+ errors++;
253
+ }
254
+ var _valid0 = _errs16 === errors;
255
+ valid6 = valid6 || _valid0;
256
+ if(!valid6){
257
+ const _errs18 = errors;
258
+ if(data6 && typeof data6 == "object" && !Array.isArray(data6)){
259
+ if(data6.protocol === undefined){
260
+ const err17 = {instancePath:instancePath+"/accepts/" + i2,schemaPath:"#/definitions/protocolRef/required",keyword:"required",params:{missingProperty: "protocol"},message:"must have required property '"+"protocol"+"'"};
261
+ if(vErrors === null){
262
+ vErrors = [err17];
263
+ }
264
+ else {
265
+ vErrors.push(err17);
266
+ }
267
+ errors++;
268
+ }
269
+ if(data6.version === undefined){
270
+ const err18 = {instancePath:instancePath+"/accepts/" + i2,schemaPath:"#/definitions/protocolRef/required",keyword:"required",params:{missingProperty: "version"},message:"must have required property '"+"version"+"'"};
271
+ if(vErrors === null){
272
+ vErrors = [err18];
273
+ }
274
+ else {
275
+ vErrors.push(err18);
276
+ }
277
+ errors++;
278
+ }
279
+ for(const key1 in data6){
280
+ if(!(((key1 === "protocol") || (key1 === "version")) || (key1 === "input"))){
281
+ const err19 = {instancePath:instancePath+"/accepts/" + i2,schemaPath:"#/definitions/protocolRef/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};
282
+ if(vErrors === null){
283
+ vErrors = [err19];
284
+ }
285
+ else {
286
+ vErrors.push(err19);
287
+ }
288
+ errors++;
289
+ }
290
+ }
291
+ if(data6.protocol !== undefined){
292
+ let data7 = data6.protocol;
293
+ if(typeof data7 === "string"){
294
+ if(func2(data7) < 1){
295
+ const err20 = {instancePath:instancePath+"/accepts/" + i2+"/protocol",schemaPath:"#/definitions/protocolRef/properties/protocol/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
296
+ if(vErrors === null){
297
+ vErrors = [err20];
298
+ }
299
+ else {
300
+ vErrors.push(err20);
301
+ }
302
+ errors++;
303
+ }
304
+ }
305
+ else {
306
+ const err21 = {instancePath:instancePath+"/accepts/" + i2+"/protocol",schemaPath:"#/definitions/protocolRef/properties/protocol/type",keyword:"type",params:{type: "string"},message:"must be string"};
307
+ if(vErrors === null){
308
+ vErrors = [err21];
309
+ }
310
+ else {
311
+ vErrors.push(err21);
312
+ }
313
+ errors++;
314
+ }
315
+ }
316
+ if(data6.version !== undefined){
317
+ let data8 = data6.version;
318
+ if(typeof data8 === "string"){
319
+ if(func2(data8) < 1){
320
+ const err22 = {instancePath:instancePath+"/accepts/" + i2+"/version",schemaPath:"#/definitions/protocolRef/properties/version/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
321
+ if(vErrors === null){
322
+ vErrors = [err22];
323
+ }
324
+ else {
325
+ vErrors.push(err22);
326
+ }
327
+ errors++;
328
+ }
329
+ }
330
+ else {
331
+ const err23 = {instancePath:instancePath+"/accepts/" + i2+"/version",schemaPath:"#/definitions/protocolRef/properties/version/type",keyword:"type",params:{type: "string"},message:"must be string"};
332
+ if(vErrors === null){
333
+ vErrors = [err23];
334
+ }
335
+ else {
336
+ vErrors.push(err23);
337
+ }
338
+ errors++;
339
+ }
340
+ }
341
+ if(data6.input !== undefined){
342
+ if(typeof data6.input !== "string"){
343
+ const err24 = {instancePath:instancePath+"/accepts/" + i2+"/input",schemaPath:"#/definitions/protocolRef/properties/input/type",keyword:"type",params:{type: "string"},message:"must be string"};
344
+ if(vErrors === null){
345
+ vErrors = [err24];
346
+ }
347
+ else {
348
+ vErrors.push(err24);
349
+ }
350
+ errors++;
351
+ }
352
+ }
353
+ }
354
+ else {
355
+ const err25 = {instancePath:instancePath+"/accepts/" + i2,schemaPath:"#/definitions/protocolRef/type",keyword:"type",params:{type: "object"},message:"must be object"};
356
+ if(vErrors === null){
357
+ vErrors = [err25];
358
+ }
359
+ else {
360
+ vErrors.push(err25);
361
+ }
362
+ errors++;
363
+ }
364
+ var _valid0 = _errs18 === errors;
365
+ valid6 = valid6 || _valid0;
366
+ }
367
+ if(!valid6){
368
+ const err26 = {instancePath:instancePath+"/accepts/" + i2,schemaPath:"#/properties/accepts/items/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};
369
+ if(vErrors === null){
370
+ vErrors = [err26];
371
+ }
372
+ else {
373
+ vErrors.push(err26);
374
+ }
375
+ errors++;
376
+ }
377
+ else {
378
+ errors = _errs15;
379
+ if(vErrors !== null){
380
+ if(_errs15){
381
+ vErrors.length = _errs15;
382
+ }
383
+ else {
384
+ vErrors = null;
385
+ }
386
+ }
387
+ }
388
+ }
389
+ }
390
+ else {
391
+ const err27 = {instancePath:instancePath+"/accepts",schemaPath:"#/properties/accepts/type",keyword:"type",params:{type: "array"},message:"must be array"};
392
+ if(vErrors === null){
393
+ vErrors = [err27];
394
+ }
395
+ else {
396
+ vErrors.push(err27);
397
+ }
398
+ errors++;
399
+ }
400
+ }
401
+ if(data.produces !== undefined){
402
+ let data10 = data.produces;
403
+ if(Array.isArray(data10)){
404
+ const len2 = data10.length;
405
+ for(let i3=0; i3<len2; i3++){
406
+ let data11 = data10[i3];
407
+ const _errs31 = errors;
408
+ let valid11 = false;
409
+ const _errs32 = errors;
410
+ if(typeof data11 === "string"){
411
+ if(func2(data11) < 1){
412
+ const err28 = {instancePath:instancePath+"/produces/" + i3,schemaPath:"#/properties/produces/items/anyOf/0/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
413
+ if(vErrors === null){
414
+ vErrors = [err28];
415
+ }
416
+ else {
417
+ vErrors.push(err28);
418
+ }
419
+ errors++;
420
+ }
421
+ }
422
+ else {
423
+ const err29 = {instancePath:instancePath+"/produces/" + i3,schemaPath:"#/properties/produces/items/anyOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};
424
+ if(vErrors === null){
425
+ vErrors = [err29];
426
+ }
427
+ else {
428
+ vErrors.push(err29);
429
+ }
430
+ errors++;
431
+ }
432
+ var _valid1 = _errs32 === errors;
433
+ valid11 = valid11 || _valid1;
434
+ if(!valid11){
435
+ const _errs34 = errors;
436
+ if(data11 && typeof data11 == "object" && !Array.isArray(data11)){
437
+ if(data11.protocol === undefined){
438
+ const err30 = {instancePath:instancePath+"/produces/" + i3,schemaPath:"#/definitions/protocolRef/required",keyword:"required",params:{missingProperty: "protocol"},message:"must have required property '"+"protocol"+"'"};
439
+ if(vErrors === null){
440
+ vErrors = [err30];
441
+ }
442
+ else {
443
+ vErrors.push(err30);
444
+ }
445
+ errors++;
446
+ }
447
+ if(data11.version === undefined){
448
+ const err31 = {instancePath:instancePath+"/produces/" + i3,schemaPath:"#/definitions/protocolRef/required",keyword:"required",params:{missingProperty: "version"},message:"must have required property '"+"version"+"'"};
449
+ if(vErrors === null){
450
+ vErrors = [err31];
451
+ }
452
+ else {
453
+ vErrors.push(err31);
454
+ }
455
+ errors++;
456
+ }
457
+ for(const key2 in data11){
458
+ if(!(((key2 === "protocol") || (key2 === "version")) || (key2 === "input"))){
459
+ const err32 = {instancePath:instancePath+"/produces/" + i3,schemaPath:"#/definitions/protocolRef/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key2},message:"must NOT have additional properties"};
460
+ if(vErrors === null){
461
+ vErrors = [err32];
462
+ }
463
+ else {
464
+ vErrors.push(err32);
465
+ }
466
+ errors++;
467
+ }
468
+ }
469
+ if(data11.protocol !== undefined){
470
+ let data12 = data11.protocol;
471
+ if(typeof data12 === "string"){
472
+ if(func2(data12) < 1){
473
+ const err33 = {instancePath:instancePath+"/produces/" + i3+"/protocol",schemaPath:"#/definitions/protocolRef/properties/protocol/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
474
+ if(vErrors === null){
475
+ vErrors = [err33];
476
+ }
477
+ else {
478
+ vErrors.push(err33);
479
+ }
480
+ errors++;
481
+ }
482
+ }
483
+ else {
484
+ const err34 = {instancePath:instancePath+"/produces/" + i3+"/protocol",schemaPath:"#/definitions/protocolRef/properties/protocol/type",keyword:"type",params:{type: "string"},message:"must be string"};
485
+ if(vErrors === null){
486
+ vErrors = [err34];
487
+ }
488
+ else {
489
+ vErrors.push(err34);
490
+ }
491
+ errors++;
492
+ }
493
+ }
494
+ if(data11.version !== undefined){
495
+ let data13 = data11.version;
496
+ if(typeof data13 === "string"){
497
+ if(func2(data13) < 1){
498
+ const err35 = {instancePath:instancePath+"/produces/" + i3+"/version",schemaPath:"#/definitions/protocolRef/properties/version/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
499
+ if(vErrors === null){
500
+ vErrors = [err35];
501
+ }
502
+ else {
503
+ vErrors.push(err35);
504
+ }
505
+ errors++;
506
+ }
507
+ }
508
+ else {
509
+ const err36 = {instancePath:instancePath+"/produces/" + i3+"/version",schemaPath:"#/definitions/protocolRef/properties/version/type",keyword:"type",params:{type: "string"},message:"must be string"};
510
+ if(vErrors === null){
511
+ vErrors = [err36];
512
+ }
513
+ else {
514
+ vErrors.push(err36);
515
+ }
516
+ errors++;
517
+ }
518
+ }
519
+ if(data11.input !== undefined){
520
+ if(typeof data11.input !== "string"){
521
+ const err37 = {instancePath:instancePath+"/produces/" + i3+"/input",schemaPath:"#/definitions/protocolRef/properties/input/type",keyword:"type",params:{type: "string"},message:"must be string"};
522
+ if(vErrors === null){
523
+ vErrors = [err37];
524
+ }
525
+ else {
526
+ vErrors.push(err37);
527
+ }
528
+ errors++;
529
+ }
530
+ }
531
+ }
532
+ else {
533
+ const err38 = {instancePath:instancePath+"/produces/" + i3,schemaPath:"#/definitions/protocolRef/type",keyword:"type",params:{type: "object"},message:"must be object"};
534
+ if(vErrors === null){
535
+ vErrors = [err38];
536
+ }
537
+ else {
538
+ vErrors.push(err38);
539
+ }
540
+ errors++;
541
+ }
542
+ var _valid1 = _errs34 === errors;
543
+ valid11 = valid11 || _valid1;
544
+ }
545
+ if(!valid11){
546
+ const err39 = {instancePath:instancePath+"/produces/" + i3,schemaPath:"#/properties/produces/items/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};
547
+ if(vErrors === null){
548
+ vErrors = [err39];
549
+ }
550
+ else {
551
+ vErrors.push(err39);
552
+ }
553
+ errors++;
554
+ }
555
+ else {
556
+ errors = _errs31;
557
+ if(vErrors !== null){
558
+ if(_errs31){
559
+ vErrors.length = _errs31;
560
+ }
561
+ else {
562
+ vErrors = null;
563
+ }
564
+ }
565
+ }
566
+ }
567
+ }
568
+ else {
569
+ const err40 = {instancePath:instancePath+"/produces",schemaPath:"#/properties/produces/type",keyword:"type",params:{type: "array"},message:"must be array"};
570
+ if(vErrors === null){
571
+ vErrors = [err40];
572
+ }
573
+ else {
574
+ vErrors.push(err40);
575
+ }
576
+ errors++;
577
+ }
578
+ }
579
+ if(data.sideEffectCeiling !== undefined){
580
+ let data15 = data.sideEffectCeiling;
581
+ if(typeof data15 !== "string"){
582
+ const err41 = {instancePath:instancePath+"/sideEffectCeiling",schemaPath:"#/properties/sideEffectCeiling/type",keyword:"type",params:{type: "string"},message:"must be string"};
583
+ if(vErrors === null){
584
+ vErrors = [err41];
585
+ }
586
+ else {
587
+ vErrors.push(err41);
588
+ }
589
+ errors++;
590
+ }
591
+ if(!(((((data15 === "none") || (data15 === "read-only")) || (data15 === "write-authorized-artifacts")) || (data15 === "write-review-result")) || (data15 === "write-project-artifacts"))){
592
+ const err42 = {instancePath:instancePath+"/sideEffectCeiling",schemaPath:"#/properties/sideEffectCeiling/enum",keyword:"enum",params:{allowedValues: schema12.properties.sideEffectCeiling.enum},message:"must be equal to one of the allowed values"};
593
+ if(vErrors === null){
594
+ vErrors = [err42];
595
+ }
596
+ else {
597
+ vErrors.push(err42);
598
+ }
599
+ errors++;
600
+ }
601
+ }
602
+ if(data.mixSafe !== undefined){
603
+ if(typeof data.mixSafe !== "boolean"){
604
+ const err43 = {instancePath:instancePath+"/mixSafe",schemaPath:"#/properties/mixSafe/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};
605
+ if(vErrors === null){
606
+ vErrors = [err43];
607
+ }
608
+ else {
609
+ vErrors.push(err43);
610
+ }
611
+ errors++;
612
+ }
613
+ }
614
+ if(data.discoverable !== undefined){
615
+ let data17 = data.discoverable;
616
+ if(data17 && typeof data17 == "object" && !Array.isArray(data17)){
617
+ for(const key3 in data17){
618
+ if(!((key3 === "default") || (key3 === "help"))){
619
+ const err44 = {instancePath:instancePath+"/discoverable",schemaPath:"#/properties/discoverable/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key3},message:"must NOT have additional properties"};
620
+ if(vErrors === null){
621
+ vErrors = [err44];
622
+ }
623
+ else {
624
+ vErrors.push(err44);
625
+ }
626
+ errors++;
627
+ }
628
+ }
629
+ if(data17.default !== undefined){
630
+ if(typeof data17.default !== "boolean"){
631
+ const err45 = {instancePath:instancePath+"/discoverable/default",schemaPath:"#/properties/discoverable/properties/default/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};
632
+ if(vErrors === null){
633
+ vErrors = [err45];
634
+ }
635
+ else {
636
+ vErrors.push(err45);
637
+ }
638
+ errors++;
639
+ }
640
+ }
641
+ if(data17.help !== undefined){
642
+ if(typeof data17.help !== "boolean"){
643
+ const err46 = {instancePath:instancePath+"/discoverable/help",schemaPath:"#/properties/discoverable/properties/help/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};
644
+ if(vErrors === null){
645
+ vErrors = [err46];
646
+ }
647
+ else {
648
+ vErrors.push(err46);
649
+ }
650
+ errors++;
651
+ }
652
+ }
653
+ }
654
+ else {
655
+ const err47 = {instancePath:instancePath+"/discoverable",schemaPath:"#/properties/discoverable/type",keyword:"type",params:{type: "object"},message:"must be object"};
656
+ if(vErrors === null){
657
+ vErrors = [err47];
658
+ }
659
+ else {
660
+ vErrors.push(err47);
661
+ }
662
+ errors++;
663
+ }
664
+ }
665
+ if(data.modes !== undefined){
666
+ let data20 = data.modes;
667
+ if(data20 && typeof data20 == "object" && !Array.isArray(data20)){
668
+ if(data20.supported === undefined){
669
+ const err48 = {instancePath:instancePath+"/modes",schemaPath:"#/definitions/serviceModes/required",keyword:"required",params:{missingProperty: "supported"},message:"must have required property '"+"supported"+"'"};
670
+ if(vErrors === null){
671
+ vErrors = [err48];
672
+ }
673
+ else {
674
+ vErrors.push(err48);
675
+ }
676
+ errors++;
677
+ }
678
+ if(data20.default === undefined){
679
+ const err49 = {instancePath:instancePath+"/modes",schemaPath:"#/definitions/serviceModes/required",keyword:"required",params:{missingProperty: "default"},message:"must have required property '"+"default"+"'"};
680
+ if(vErrors === null){
681
+ vErrors = [err49];
682
+ }
683
+ else {
684
+ vErrors.push(err49);
685
+ }
686
+ errors++;
687
+ }
688
+ for(const key4 in data20){
689
+ if(!((key4 === "supported") || (key4 === "default"))){
690
+ const err50 = {instancePath:instancePath+"/modes",schemaPath:"#/definitions/serviceModes/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key4},message:"must NOT have additional properties"};
691
+ if(vErrors === null){
692
+ vErrors = [err50];
693
+ }
694
+ else {
695
+ vErrors.push(err50);
696
+ }
697
+ errors++;
698
+ }
699
+ }
700
+ if(data20.supported !== undefined){
701
+ let data21 = data20.supported;
702
+ if(Array.isArray(data21)){
703
+ if(data21.length < 1){
704
+ const err51 = {instancePath:instancePath+"/modes/supported",schemaPath:"#/definitions/serviceModes/properties/supported/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};
705
+ if(vErrors === null){
706
+ vErrors = [err51];
707
+ }
708
+ else {
709
+ vErrors.push(err51);
710
+ }
711
+ errors++;
712
+ }
713
+ const len3 = data21.length;
714
+ for(let i4=0; i4<len3; i4++){
715
+ let data22 = data21[i4];
716
+ if(typeof data22 === "string"){
717
+ if(!pattern3.test(data22)){
718
+ const err52 = {instancePath:instancePath+"/modes/supported/" + i4,schemaPath:"#/definitions/serviceModes/properties/supported/items/pattern",keyword:"pattern",params:{pattern: "^[a-z][a-z0-9-]*$"},message:"must match pattern \""+"^[a-z][a-z0-9-]*$"+"\""};
719
+ if(vErrors === null){
720
+ vErrors = [err52];
721
+ }
722
+ else {
723
+ vErrors.push(err52);
724
+ }
725
+ errors++;
726
+ }
727
+ }
728
+ else {
729
+ const err53 = {instancePath:instancePath+"/modes/supported/" + i4,schemaPath:"#/definitions/serviceModes/properties/supported/items/type",keyword:"type",params:{type: "string"},message:"must be string"};
730
+ if(vErrors === null){
731
+ vErrors = [err53];
732
+ }
733
+ else {
734
+ vErrors.push(err53);
735
+ }
736
+ errors++;
737
+ }
738
+ }
739
+ let i5 = data21.length;
740
+ let j1;
741
+ if(i5 > 1){
742
+ const indices1 = {};
743
+ for(;i5--;){
744
+ let item1 = data21[i5];
745
+ if(typeof item1 !== "string"){
746
+ continue;
747
+ }
748
+ if(typeof indices1[item1] == "number"){
749
+ j1 = indices1[item1];
750
+ const err54 = {instancePath:instancePath+"/modes/supported",schemaPath:"#/definitions/serviceModes/properties/supported/uniqueItems",keyword:"uniqueItems",params:{i: i5, j: j1},message:"must NOT have duplicate items (items ## "+j1+" and "+i5+" are identical)"};
751
+ if(vErrors === null){
752
+ vErrors = [err54];
753
+ }
754
+ else {
755
+ vErrors.push(err54);
756
+ }
757
+ errors++;
758
+ break;
759
+ }
760
+ indices1[item1] = i5;
761
+ }
762
+ }
763
+ }
764
+ else {
765
+ const err55 = {instancePath:instancePath+"/modes/supported",schemaPath:"#/definitions/serviceModes/properties/supported/type",keyword:"type",params:{type: "array"},message:"must be array"};
766
+ if(vErrors === null){
767
+ vErrors = [err55];
768
+ }
769
+ else {
770
+ vErrors.push(err55);
771
+ }
772
+ errors++;
773
+ }
774
+ }
775
+ if(data20.default !== undefined){
776
+ let data23 = data20.default;
777
+ if(typeof data23 === "string"){
778
+ if(!pattern3.test(data23)){
779
+ const err56 = {instancePath:instancePath+"/modes/default",schemaPath:"#/definitions/serviceModes/properties/default/pattern",keyword:"pattern",params:{pattern: "^[a-z][a-z0-9-]*$"},message:"must match pattern \""+"^[a-z][a-z0-9-]*$"+"\""};
780
+ if(vErrors === null){
781
+ vErrors = [err56];
782
+ }
783
+ else {
784
+ vErrors.push(err56);
785
+ }
786
+ errors++;
787
+ }
788
+ }
789
+ else {
790
+ const err57 = {instancePath:instancePath+"/modes/default",schemaPath:"#/definitions/serviceModes/properties/default/type",keyword:"type",params:{type: "string"},message:"must be string"};
791
+ if(vErrors === null){
792
+ vErrors = [err57];
793
+ }
794
+ else {
795
+ vErrors.push(err57);
796
+ }
797
+ errors++;
798
+ }
799
+ }
800
+ }
801
+ else {
802
+ const err58 = {instancePath:instancePath+"/modes",schemaPath:"#/definitions/serviceModes/type",keyword:"type",params:{type: "object"},message:"must be object"};
803
+ if(vErrors === null){
804
+ vErrors = [err58];
805
+ }
806
+ else {
807
+ vErrors.push(err58);
808
+ }
809
+ errors++;
810
+ }
811
+ }
812
+ }
813
+ else {
814
+ const err59 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};
815
+ if(vErrors === null){
816
+ vErrors = [err59];
817
+ }
818
+ else {
819
+ vErrors.push(err59);
820
+ }
821
+ errors++;
822
+ }
823
+ validate11.errors = vErrors;
824
+ return errors === 0;
825
+ }
826
+
827
+
828
+ function validate10(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){
829
+ /*# sourceURL="https://artifact-chain.dev/schemas/family-api.schema.json" */;
830
+ let vErrors = null;
831
+ let errors = 0;
832
+ if(data && typeof data == "object" && !Array.isArray(data)){
833
+ if(data.schemaVersion === undefined){
834
+ const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "schemaVersion"},message:"must have required property '"+"schemaVersion"+"'"};
835
+ if(vErrors === null){
836
+ vErrors = [err0];
837
+ }
838
+ else {
839
+ vErrors.push(err0);
840
+ }
841
+ errors++;
842
+ }
843
+ if(data.api === undefined){
844
+ const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "api"},message:"must have required property '"+"api"+"'"};
845
+ if(vErrors === null){
846
+ vErrors = [err1];
847
+ }
848
+ else {
849
+ vErrors.push(err1);
850
+ }
851
+ errors++;
852
+ }
853
+ if(data.services === undefined){
854
+ const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "services"},message:"must have required property '"+"services"+"'"};
855
+ if(vErrors === null){
856
+ vErrors = [err2];
857
+ }
858
+ else {
859
+ vErrors.push(err2);
860
+ }
861
+ errors++;
862
+ }
863
+ for(const key0 in data){
864
+ if(!((((((key0 === "schemaVersion") || (key0 === "api")) || (key0 === "services")) || (key0 === "capabilities")) || (key0 === "dataTransferObjects")) || (key0 === "qualificationKinds"))){
865
+ const err3 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};
866
+ if(vErrors === null){
867
+ vErrors = [err3];
868
+ }
869
+ else {
870
+ vErrors.push(err3);
871
+ }
872
+ errors++;
873
+ }
874
+ }
875
+ if(data.schemaVersion !== undefined){
876
+ let data0 = data.schemaVersion;
877
+ if(!((typeof data0 == "number") && (!(data0 % 1) && !isNaN(data0)))){
878
+ const err4 = {instancePath:instancePath+"/schemaVersion",schemaPath:"#/properties/schemaVersion/type",keyword:"type",params:{type: "integer"},message:"must be integer"};
879
+ if(vErrors === null){
880
+ vErrors = [err4];
881
+ }
882
+ else {
883
+ vErrors.push(err4);
884
+ }
885
+ errors++;
886
+ }
887
+ if(1 !== data0){
888
+ const err5 = {instancePath:instancePath+"/schemaVersion",schemaPath:"#/properties/schemaVersion/const",keyword:"const",params:{allowedValue: 1},message:"must be equal to constant"};
889
+ if(vErrors === null){
890
+ vErrors = [err5];
891
+ }
892
+ else {
893
+ vErrors.push(err5);
894
+ }
895
+ errors++;
896
+ }
897
+ }
898
+ if(data.api !== undefined){
899
+ let data1 = data.api;
900
+ if(data1 && typeof data1 == "object" && !Array.isArray(data1)){
901
+ if(data1.id === undefined){
902
+ const err6 = {instancePath:instancePath+"/api",schemaPath:"#/properties/api/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};
903
+ if(vErrors === null){
904
+ vErrors = [err6];
905
+ }
906
+ else {
907
+ vErrors.push(err6);
908
+ }
909
+ errors++;
910
+ }
911
+ if(data1.major === undefined){
912
+ const err7 = {instancePath:instancePath+"/api",schemaPath:"#/properties/api/required",keyword:"required",params:{missingProperty: "major"},message:"must have required property '"+"major"+"'"};
913
+ if(vErrors === null){
914
+ vErrors = [err7];
915
+ }
916
+ else {
917
+ vErrors.push(err7);
918
+ }
919
+ errors++;
920
+ }
921
+ if(data1.revisionDigest === undefined){
922
+ const err8 = {instancePath:instancePath+"/api",schemaPath:"#/properties/api/required",keyword:"required",params:{missingProperty: "revisionDigest"},message:"must have required property '"+"revisionDigest"+"'"};
923
+ if(vErrors === null){
924
+ vErrors = [err8];
925
+ }
926
+ else {
927
+ vErrors.push(err8);
928
+ }
929
+ errors++;
930
+ }
931
+ if(data1.displayName === undefined){
932
+ const err9 = {instancePath:instancePath+"/api",schemaPath:"#/properties/api/required",keyword:"required",params:{missingProperty: "displayName"},message:"must have required property '"+"displayName"+"'"};
933
+ if(vErrors === null){
934
+ vErrors = [err9];
935
+ }
936
+ else {
937
+ vErrors.push(err9);
938
+ }
939
+ errors++;
940
+ }
941
+ if(data1.summary === undefined){
942
+ const err10 = {instancePath:instancePath+"/api",schemaPath:"#/properties/api/required",keyword:"required",params:{missingProperty: "summary"},message:"must have required property '"+"summary"+"'"};
943
+ if(vErrors === null){
944
+ vErrors = [err10];
945
+ }
946
+ else {
947
+ vErrors.push(err10);
948
+ }
949
+ errors++;
950
+ }
951
+ for(const key1 in data1){
952
+ if(!((((((key1 === "id") || (key1 === "major")) || (key1 === "revisionDigest")) || (key1 === "displayName")) || (key1 === "summary")) || (key1 === "artifactTypes"))){
953
+ const err11 = {instancePath:instancePath+"/api",schemaPath:"#/properties/api/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};
954
+ if(vErrors === null){
955
+ vErrors = [err11];
956
+ }
957
+ else {
958
+ vErrors.push(err11);
959
+ }
960
+ errors++;
961
+ }
962
+ }
963
+ if(data1.id !== undefined){
964
+ let data2 = data1.id;
965
+ if(typeof data2 === "string"){
966
+ if(!pattern0.test(data2)){
967
+ const err12 = {instancePath:instancePath+"/api/id",schemaPath:"#/properties/api/properties/id/pattern",keyword:"pattern",params:{pattern: "^artifact\\.[a-z][a-z0-9-]*-family$"},message:"must match pattern \""+"^artifact\\.[a-z][a-z0-9-]*-family$"+"\""};
968
+ if(vErrors === null){
969
+ vErrors = [err12];
970
+ }
971
+ else {
972
+ vErrors.push(err12);
973
+ }
974
+ errors++;
975
+ }
976
+ }
977
+ else {
978
+ const err13 = {instancePath:instancePath+"/api/id",schemaPath:"#/properties/api/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"};
979
+ if(vErrors === null){
980
+ vErrors = [err13];
981
+ }
982
+ else {
983
+ vErrors.push(err13);
984
+ }
985
+ errors++;
986
+ }
987
+ }
988
+ if(data1.major !== undefined){
989
+ let data3 = data1.major;
990
+ if(!((typeof data3 == "number") && (!(data3 % 1) && !isNaN(data3)))){
991
+ const err14 = {instancePath:instancePath+"/api/major",schemaPath:"#/properties/api/properties/major/type",keyword:"type",params:{type: "integer"},message:"must be integer"};
992
+ if(vErrors === null){
993
+ vErrors = [err14];
994
+ }
995
+ else {
996
+ vErrors.push(err14);
997
+ }
998
+ errors++;
999
+ }
1000
+ if(typeof data3 == "number"){
1001
+ if(data3 < 1 || isNaN(data3)){
1002
+ const err15 = {instancePath:instancePath+"/api/major",schemaPath:"#/properties/api/properties/major/minimum",keyword:"minimum",params:{comparison: ">=", limit: 1},message:"must be >= 1"};
1003
+ if(vErrors === null){
1004
+ vErrors = [err15];
1005
+ }
1006
+ else {
1007
+ vErrors.push(err15);
1008
+ }
1009
+ errors++;
1010
+ }
1011
+ }
1012
+ }
1013
+ if(data1.revisionDigest !== undefined){
1014
+ let data4 = data1.revisionDigest;
1015
+ if(typeof data4 === "string"){
1016
+ if(!pattern1.test(data4)){
1017
+ const err16 = {instancePath:instancePath+"/api/revisionDigest",schemaPath:"#/properties/api/properties/revisionDigest/pattern",keyword:"pattern",params:{pattern: "^sha256:[a-f0-9]{64}$"},message:"must match pattern \""+"^sha256:[a-f0-9]{64}$"+"\""};
1018
+ if(vErrors === null){
1019
+ vErrors = [err16];
1020
+ }
1021
+ else {
1022
+ vErrors.push(err16);
1023
+ }
1024
+ errors++;
1025
+ }
1026
+ }
1027
+ else {
1028
+ const err17 = {instancePath:instancePath+"/api/revisionDigest",schemaPath:"#/properties/api/properties/revisionDigest/type",keyword:"type",params:{type: "string"},message:"must be string"};
1029
+ if(vErrors === null){
1030
+ vErrors = [err17];
1031
+ }
1032
+ else {
1033
+ vErrors.push(err17);
1034
+ }
1035
+ errors++;
1036
+ }
1037
+ }
1038
+ if(data1.displayName !== undefined){
1039
+ let data5 = data1.displayName;
1040
+ if(typeof data5 === "string"){
1041
+ if(func2(data5) < 1){
1042
+ const err18 = {instancePath:instancePath+"/api/displayName",schemaPath:"#/properties/api/properties/displayName/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
1043
+ if(vErrors === null){
1044
+ vErrors = [err18];
1045
+ }
1046
+ else {
1047
+ vErrors.push(err18);
1048
+ }
1049
+ errors++;
1050
+ }
1051
+ }
1052
+ else {
1053
+ const err19 = {instancePath:instancePath+"/api/displayName",schemaPath:"#/properties/api/properties/displayName/type",keyword:"type",params:{type: "string"},message:"must be string"};
1054
+ if(vErrors === null){
1055
+ vErrors = [err19];
1056
+ }
1057
+ else {
1058
+ vErrors.push(err19);
1059
+ }
1060
+ errors++;
1061
+ }
1062
+ }
1063
+ if(data1.summary !== undefined){
1064
+ let data6 = data1.summary;
1065
+ if(typeof data6 === "string"){
1066
+ if(func2(data6) < 1){
1067
+ const err20 = {instancePath:instancePath+"/api/summary",schemaPath:"#/properties/api/properties/summary/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
1068
+ if(vErrors === null){
1069
+ vErrors = [err20];
1070
+ }
1071
+ else {
1072
+ vErrors.push(err20);
1073
+ }
1074
+ errors++;
1075
+ }
1076
+ }
1077
+ else {
1078
+ const err21 = {instancePath:instancePath+"/api/summary",schemaPath:"#/properties/api/properties/summary/type",keyword:"type",params:{type: "string"},message:"must be string"};
1079
+ if(vErrors === null){
1080
+ vErrors = [err21];
1081
+ }
1082
+ else {
1083
+ vErrors.push(err21);
1084
+ }
1085
+ errors++;
1086
+ }
1087
+ }
1088
+ if(data1.artifactTypes !== undefined){
1089
+ let data7 = data1.artifactTypes;
1090
+ if(Array.isArray(data7)){
1091
+ const len0 = data7.length;
1092
+ for(let i0=0; i0<len0; i0++){
1093
+ let data8 = data7[i0];
1094
+ if(typeof data8 === "string"){
1095
+ if(func2(data8) < 1){
1096
+ const err22 = {instancePath:instancePath+"/api/artifactTypes/" + i0,schemaPath:"#/properties/api/properties/artifactTypes/items/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
1097
+ if(vErrors === null){
1098
+ vErrors = [err22];
1099
+ }
1100
+ else {
1101
+ vErrors.push(err22);
1102
+ }
1103
+ errors++;
1104
+ }
1105
+ }
1106
+ else {
1107
+ const err23 = {instancePath:instancePath+"/api/artifactTypes/" + i0,schemaPath:"#/properties/api/properties/artifactTypes/items/type",keyword:"type",params:{type: "string"},message:"must be string"};
1108
+ if(vErrors === null){
1109
+ vErrors = [err23];
1110
+ }
1111
+ else {
1112
+ vErrors.push(err23);
1113
+ }
1114
+ errors++;
1115
+ }
1116
+ }
1117
+ let i1 = data7.length;
1118
+ let j0;
1119
+ if(i1 > 1){
1120
+ const indices0 = {};
1121
+ for(;i1--;){
1122
+ let item0 = data7[i1];
1123
+ if(typeof item0 !== "string"){
1124
+ continue;
1125
+ }
1126
+ if(typeof indices0[item0] == "number"){
1127
+ j0 = indices0[item0];
1128
+ const err24 = {instancePath:instancePath+"/api/artifactTypes",schemaPath:"#/properties/api/properties/artifactTypes/uniqueItems",keyword:"uniqueItems",params:{i: i1, j: j0},message:"must NOT have duplicate items (items ## "+j0+" and "+i1+" are identical)"};
1129
+ if(vErrors === null){
1130
+ vErrors = [err24];
1131
+ }
1132
+ else {
1133
+ vErrors.push(err24);
1134
+ }
1135
+ errors++;
1136
+ break;
1137
+ }
1138
+ indices0[item0] = i1;
1139
+ }
1140
+ }
1141
+ }
1142
+ else {
1143
+ const err25 = {instancePath:instancePath+"/api/artifactTypes",schemaPath:"#/properties/api/properties/artifactTypes/type",keyword:"type",params:{type: "array"},message:"must be array"};
1144
+ if(vErrors === null){
1145
+ vErrors = [err25];
1146
+ }
1147
+ else {
1148
+ vErrors.push(err25);
1149
+ }
1150
+ errors++;
1151
+ }
1152
+ }
1153
+ }
1154
+ else {
1155
+ const err26 = {instancePath:instancePath+"/api",schemaPath:"#/properties/api/type",keyword:"type",params:{type: "object"},message:"must be object"};
1156
+ if(vErrors === null){
1157
+ vErrors = [err26];
1158
+ }
1159
+ else {
1160
+ vErrors.push(err26);
1161
+ }
1162
+ errors++;
1163
+ }
1164
+ }
1165
+ if(data.services !== undefined){
1166
+ let data9 = data.services;
1167
+ if(Array.isArray(data9)){
1168
+ if(data9.length < 1){
1169
+ const err27 = {instancePath:instancePath+"/services",schemaPath:"#/properties/services/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};
1170
+ if(vErrors === null){
1171
+ vErrors = [err27];
1172
+ }
1173
+ else {
1174
+ vErrors.push(err27);
1175
+ }
1176
+ errors++;
1177
+ }
1178
+ const len1 = data9.length;
1179
+ for(let i2=0; i2<len1; i2++){
1180
+ if(!(validate11(data9[i2], {instancePath:instancePath+"/services/" + i2,parentData:data9,parentDataProperty:i2,rootData}))){
1181
+ vErrors = vErrors === null ? validate11.errors : vErrors.concat(validate11.errors);
1182
+ errors = vErrors.length;
1183
+ }
1184
+ }
1185
+ }
1186
+ else {
1187
+ const err28 = {instancePath:instancePath+"/services",schemaPath:"#/properties/services/type",keyword:"type",params:{type: "array"},message:"must be array"};
1188
+ if(vErrors === null){
1189
+ vErrors = [err28];
1190
+ }
1191
+ else {
1192
+ vErrors.push(err28);
1193
+ }
1194
+ errors++;
1195
+ }
1196
+ }
1197
+ if(data.capabilities !== undefined){
1198
+ let data11 = data.capabilities;
1199
+ if(Array.isArray(data11)){
1200
+ const len2 = data11.length;
1201
+ for(let i3=0; i3<len2; i3++){
1202
+ let data12 = data11[i3];
1203
+ if(data12 && typeof data12 == "object" && !Array.isArray(data12)){
1204
+ if(data12.id === undefined){
1205
+ const err29 = {instancePath:instancePath+"/capabilities/" + i3,schemaPath:"#/definitions/capability/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};
1206
+ if(vErrors === null){
1207
+ vErrors = [err29];
1208
+ }
1209
+ else {
1210
+ vErrors.push(err29);
1211
+ }
1212
+ errors++;
1213
+ }
1214
+ if(data12.summary === undefined){
1215
+ const err30 = {instancePath:instancePath+"/capabilities/" + i3,schemaPath:"#/definitions/capability/required",keyword:"required",params:{missingProperty: "summary"},message:"must have required property '"+"summary"+"'"};
1216
+ if(vErrors === null){
1217
+ vErrors = [err30];
1218
+ }
1219
+ else {
1220
+ vErrors.push(err30);
1221
+ }
1222
+ errors++;
1223
+ }
1224
+ for(const key2 in data12){
1225
+ if(!((key2 === "id") || (key2 === "summary"))){
1226
+ const err31 = {instancePath:instancePath+"/capabilities/" + i3,schemaPath:"#/definitions/capability/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key2},message:"must NOT have additional properties"};
1227
+ if(vErrors === null){
1228
+ vErrors = [err31];
1229
+ }
1230
+ else {
1231
+ vErrors.push(err31);
1232
+ }
1233
+ errors++;
1234
+ }
1235
+ }
1236
+ if(data12.id !== undefined){
1237
+ let data13 = data12.id;
1238
+ if(typeof data13 === "string"){
1239
+ if(func2(data13) < 1){
1240
+ const err32 = {instancePath:instancePath+"/capabilities/" + i3+"/id",schemaPath:"#/definitions/capability/properties/id/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
1241
+ if(vErrors === null){
1242
+ vErrors = [err32];
1243
+ }
1244
+ else {
1245
+ vErrors.push(err32);
1246
+ }
1247
+ errors++;
1248
+ }
1249
+ }
1250
+ else {
1251
+ const err33 = {instancePath:instancePath+"/capabilities/" + i3+"/id",schemaPath:"#/definitions/capability/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"};
1252
+ if(vErrors === null){
1253
+ vErrors = [err33];
1254
+ }
1255
+ else {
1256
+ vErrors.push(err33);
1257
+ }
1258
+ errors++;
1259
+ }
1260
+ }
1261
+ if(data12.summary !== undefined){
1262
+ let data14 = data12.summary;
1263
+ if(typeof data14 === "string"){
1264
+ if(func2(data14) < 1){
1265
+ const err34 = {instancePath:instancePath+"/capabilities/" + i3+"/summary",schemaPath:"#/definitions/capability/properties/summary/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
1266
+ if(vErrors === null){
1267
+ vErrors = [err34];
1268
+ }
1269
+ else {
1270
+ vErrors.push(err34);
1271
+ }
1272
+ errors++;
1273
+ }
1274
+ }
1275
+ else {
1276
+ const err35 = {instancePath:instancePath+"/capabilities/" + i3+"/summary",schemaPath:"#/definitions/capability/properties/summary/type",keyword:"type",params:{type: "string"},message:"must be string"};
1277
+ if(vErrors === null){
1278
+ vErrors = [err35];
1279
+ }
1280
+ else {
1281
+ vErrors.push(err35);
1282
+ }
1283
+ errors++;
1284
+ }
1285
+ }
1286
+ }
1287
+ else {
1288
+ const err36 = {instancePath:instancePath+"/capabilities/" + i3,schemaPath:"#/definitions/capability/type",keyword:"type",params:{type: "object"},message:"must be object"};
1289
+ if(vErrors === null){
1290
+ vErrors = [err36];
1291
+ }
1292
+ else {
1293
+ vErrors.push(err36);
1294
+ }
1295
+ errors++;
1296
+ }
1297
+ }
1298
+ }
1299
+ else {
1300
+ const err37 = {instancePath:instancePath+"/capabilities",schemaPath:"#/properties/capabilities/type",keyword:"type",params:{type: "array"},message:"must be array"};
1301
+ if(vErrors === null){
1302
+ vErrors = [err37];
1303
+ }
1304
+ else {
1305
+ vErrors.push(err37);
1306
+ }
1307
+ errors++;
1308
+ }
1309
+ }
1310
+ if(data.dataTransferObjects !== undefined){
1311
+ let data15 = data.dataTransferObjects;
1312
+ if(Array.isArray(data15)){
1313
+ const len3 = data15.length;
1314
+ for(let i4=0; i4<len3; i4++){
1315
+ let data16 = data15[i4];
1316
+ if(data16 && typeof data16 == "object" && !Array.isArray(data16)){
1317
+ if(data16.id === undefined){
1318
+ const err38 = {instancePath:instancePath+"/dataTransferObjects/" + i4,schemaPath:"#/definitions/dataTransferObject/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};
1319
+ if(vErrors === null){
1320
+ vErrors = [err38];
1321
+ }
1322
+ else {
1323
+ vErrors.push(err38);
1324
+ }
1325
+ errors++;
1326
+ }
1327
+ if(data16.schemaId === undefined){
1328
+ const err39 = {instancePath:instancePath+"/dataTransferObjects/" + i4,schemaPath:"#/definitions/dataTransferObject/required",keyword:"required",params:{missingProperty: "schemaId"},message:"must have required property '"+"schemaId"+"'"};
1329
+ if(vErrors === null){
1330
+ vErrors = [err39];
1331
+ }
1332
+ else {
1333
+ vErrors.push(err39);
1334
+ }
1335
+ errors++;
1336
+ }
1337
+ if(data16.schema === undefined){
1338
+ const err40 = {instancePath:instancePath+"/dataTransferObjects/" + i4,schemaPath:"#/definitions/dataTransferObject/required",keyword:"required",params:{missingProperty: "schema"},message:"must have required property '"+"schema"+"'"};
1339
+ if(vErrors === null){
1340
+ vErrors = [err40];
1341
+ }
1342
+ else {
1343
+ vErrors.push(err40);
1344
+ }
1345
+ errors++;
1346
+ }
1347
+ if(data16.version === undefined){
1348
+ const err41 = {instancePath:instancePath+"/dataTransferObjects/" + i4,schemaPath:"#/definitions/dataTransferObject/required",keyword:"required",params:{missingProperty: "version"},message:"must have required property '"+"version"+"'"};
1349
+ if(vErrors === null){
1350
+ vErrors = [err41];
1351
+ }
1352
+ else {
1353
+ vErrors.push(err41);
1354
+ }
1355
+ errors++;
1356
+ }
1357
+ if(data16.digestRule === undefined){
1358
+ const err42 = {instancePath:instancePath+"/dataTransferObjects/" + i4,schemaPath:"#/definitions/dataTransferObject/required",keyword:"required",params:{missingProperty: "digestRule"},message:"must have required property '"+"digestRule"+"'"};
1359
+ if(vErrors === null){
1360
+ vErrors = [err42];
1361
+ }
1362
+ else {
1363
+ vErrors.push(err42);
1364
+ }
1365
+ errors++;
1366
+ }
1367
+ if(data16.services === undefined){
1368
+ const err43 = {instancePath:instancePath+"/dataTransferObjects/" + i4,schemaPath:"#/definitions/dataTransferObject/required",keyword:"required",params:{missingProperty: "services"},message:"must have required property '"+"services"+"'"};
1369
+ if(vErrors === null){
1370
+ vErrors = [err43];
1371
+ }
1372
+ else {
1373
+ vErrors.push(err43);
1374
+ }
1375
+ errors++;
1376
+ }
1377
+ for(const key3 in data16){
1378
+ if(!(((((((key3 === "id") || (key3 === "schemaId")) || (key3 === "schema")) || (key3 === "version")) || (key3 === "digestRule")) || (key3 === "artifactBinding")) || (key3 === "services"))){
1379
+ const err44 = {instancePath:instancePath+"/dataTransferObjects/" + i4,schemaPath:"#/definitions/dataTransferObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key3},message:"must NOT have additional properties"};
1380
+ if(vErrors === null){
1381
+ vErrors = [err44];
1382
+ }
1383
+ else {
1384
+ vErrors.push(err44);
1385
+ }
1386
+ errors++;
1387
+ }
1388
+ }
1389
+ if(data16.id !== undefined){
1390
+ let data17 = data16.id;
1391
+ if(typeof data17 === "string"){
1392
+ if(!pattern3.test(data17)){
1393
+ const err45 = {instancePath:instancePath+"/dataTransferObjects/" + i4+"/id",schemaPath:"#/definitions/dataTransferObject/properties/id/pattern",keyword:"pattern",params:{pattern: "^[a-z][a-z0-9-]*$"},message:"must match pattern \""+"^[a-z][a-z0-9-]*$"+"\""};
1394
+ if(vErrors === null){
1395
+ vErrors = [err45];
1396
+ }
1397
+ else {
1398
+ vErrors.push(err45);
1399
+ }
1400
+ errors++;
1401
+ }
1402
+ }
1403
+ else {
1404
+ const err46 = {instancePath:instancePath+"/dataTransferObjects/" + i4+"/id",schemaPath:"#/definitions/dataTransferObject/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"};
1405
+ if(vErrors === null){
1406
+ vErrors = [err46];
1407
+ }
1408
+ else {
1409
+ vErrors.push(err46);
1410
+ }
1411
+ errors++;
1412
+ }
1413
+ }
1414
+ if(data16.schemaId !== undefined){
1415
+ let data18 = data16.schemaId;
1416
+ if(typeof data18 === "string"){
1417
+ if(func2(data18) < 1){
1418
+ const err47 = {instancePath:instancePath+"/dataTransferObjects/" + i4+"/schemaId",schemaPath:"#/definitions/dataTransferObject/properties/schemaId/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
1419
+ if(vErrors === null){
1420
+ vErrors = [err47];
1421
+ }
1422
+ else {
1423
+ vErrors.push(err47);
1424
+ }
1425
+ errors++;
1426
+ }
1427
+ }
1428
+ else {
1429
+ const err48 = {instancePath:instancePath+"/dataTransferObjects/" + i4+"/schemaId",schemaPath:"#/definitions/dataTransferObject/properties/schemaId/type",keyword:"type",params:{type: "string"},message:"must be string"};
1430
+ if(vErrors === null){
1431
+ vErrors = [err48];
1432
+ }
1433
+ else {
1434
+ vErrors.push(err48);
1435
+ }
1436
+ errors++;
1437
+ }
1438
+ }
1439
+ if(data16.schema !== undefined){
1440
+ let data19 = data16.schema;
1441
+ if(typeof data19 === "string"){
1442
+ if(!pattern6.test(data19)){
1443
+ const err49 = {instancePath:instancePath+"/dataTransferObjects/" + i4+"/schema",schemaPath:"#/definitions/dataTransferObject/properties/schema/pattern",keyword:"pattern",params:{pattern: "^[^/\\\\~].*\\.json$"},message:"must match pattern \""+"^[^/\\\\~].*\\.json$"+"\""};
1444
+ if(vErrors === null){
1445
+ vErrors = [err49];
1446
+ }
1447
+ else {
1448
+ vErrors.push(err49);
1449
+ }
1450
+ errors++;
1451
+ }
1452
+ }
1453
+ else {
1454
+ const err50 = {instancePath:instancePath+"/dataTransferObjects/" + i4+"/schema",schemaPath:"#/definitions/dataTransferObject/properties/schema/type",keyword:"type",params:{type: "string"},message:"must be string"};
1455
+ if(vErrors === null){
1456
+ vErrors = [err50];
1457
+ }
1458
+ else {
1459
+ vErrors.push(err50);
1460
+ }
1461
+ errors++;
1462
+ }
1463
+ }
1464
+ if(data16.version !== undefined){
1465
+ let data20 = data16.version;
1466
+ if(typeof data20 === "string"){
1467
+ if(func2(data20) < 1){
1468
+ const err51 = {instancePath:instancePath+"/dataTransferObjects/" + i4+"/version",schemaPath:"#/definitions/dataTransferObject/properties/version/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
1469
+ if(vErrors === null){
1470
+ vErrors = [err51];
1471
+ }
1472
+ else {
1473
+ vErrors.push(err51);
1474
+ }
1475
+ errors++;
1476
+ }
1477
+ }
1478
+ else {
1479
+ const err52 = {instancePath:instancePath+"/dataTransferObjects/" + i4+"/version",schemaPath:"#/definitions/dataTransferObject/properties/version/type",keyword:"type",params:{type: "string"},message:"must be string"};
1480
+ if(vErrors === null){
1481
+ vErrors = [err52];
1482
+ }
1483
+ else {
1484
+ vErrors.push(err52);
1485
+ }
1486
+ errors++;
1487
+ }
1488
+ }
1489
+ if(data16.digestRule !== undefined){
1490
+ let data21 = data16.digestRule;
1491
+ if(typeof data21 === "string"){
1492
+ if(func2(data21) < 1){
1493
+ const err53 = {instancePath:instancePath+"/dataTransferObjects/" + i4+"/digestRule",schemaPath:"#/definitions/dataTransferObject/properties/digestRule/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
1494
+ if(vErrors === null){
1495
+ vErrors = [err53];
1496
+ }
1497
+ else {
1498
+ vErrors.push(err53);
1499
+ }
1500
+ errors++;
1501
+ }
1502
+ }
1503
+ else {
1504
+ const err54 = {instancePath:instancePath+"/dataTransferObjects/" + i4+"/digestRule",schemaPath:"#/definitions/dataTransferObject/properties/digestRule/type",keyword:"type",params:{type: "string"},message:"must be string"};
1505
+ if(vErrors === null){
1506
+ vErrors = [err54];
1507
+ }
1508
+ else {
1509
+ vErrors.push(err54);
1510
+ }
1511
+ errors++;
1512
+ }
1513
+ }
1514
+ if(data16.artifactBinding !== undefined){
1515
+ let data22 = data16.artifactBinding;
1516
+ if(typeof data22 === "string"){
1517
+ if(func2(data22) < 1){
1518
+ const err55 = {instancePath:instancePath+"/dataTransferObjects/" + i4+"/artifactBinding",schemaPath:"#/definitions/dataTransferObject/properties/artifactBinding/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
1519
+ if(vErrors === null){
1520
+ vErrors = [err55];
1521
+ }
1522
+ else {
1523
+ vErrors.push(err55);
1524
+ }
1525
+ errors++;
1526
+ }
1527
+ }
1528
+ else {
1529
+ const err56 = {instancePath:instancePath+"/dataTransferObjects/" + i4+"/artifactBinding",schemaPath:"#/definitions/dataTransferObject/properties/artifactBinding/type",keyword:"type",params:{type: "string"},message:"must be string"};
1530
+ if(vErrors === null){
1531
+ vErrors = [err56];
1532
+ }
1533
+ else {
1534
+ vErrors.push(err56);
1535
+ }
1536
+ errors++;
1537
+ }
1538
+ }
1539
+ if(data16.services !== undefined){
1540
+ let data23 = data16.services;
1541
+ if(Array.isArray(data23)){
1542
+ const len4 = data23.length;
1543
+ for(let i5=0; i5<len4; i5++){
1544
+ let data24 = data23[i5];
1545
+ if(data24 && typeof data24 == "object" && !Array.isArray(data24)){
1546
+ if(data24.service === undefined){
1547
+ const err57 = {instancePath:instancePath+"/dataTransferObjects/" + i4+"/services/" + i5,schemaPath:"#/definitions/dataTransferObject/properties/services/items/required",keyword:"required",params:{missingProperty: "service"},message:"must have required property '"+"service"+"'"};
1548
+ if(vErrors === null){
1549
+ vErrors = [err57];
1550
+ }
1551
+ else {
1552
+ vErrors.push(err57);
1553
+ }
1554
+ errors++;
1555
+ }
1556
+ if(data24.position === undefined){
1557
+ const err58 = {instancePath:instancePath+"/dataTransferObjects/" + i4+"/services/" + i5,schemaPath:"#/definitions/dataTransferObject/properties/services/items/required",keyword:"required",params:{missingProperty: "position"},message:"must have required property '"+"position"+"'"};
1558
+ if(vErrors === null){
1559
+ vErrors = [err58];
1560
+ }
1561
+ else {
1562
+ vErrors.push(err58);
1563
+ }
1564
+ errors++;
1565
+ }
1566
+ for(const key4 in data24){
1567
+ if(!((key4 === "service") || (key4 === "position"))){
1568
+ const err59 = {instancePath:instancePath+"/dataTransferObjects/" + i4+"/services/" + i5,schemaPath:"#/definitions/dataTransferObject/properties/services/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key4},message:"must NOT have additional properties"};
1569
+ if(vErrors === null){
1570
+ vErrors = [err59];
1571
+ }
1572
+ else {
1573
+ vErrors.push(err59);
1574
+ }
1575
+ errors++;
1576
+ }
1577
+ }
1578
+ if(data24.service !== undefined){
1579
+ let data25 = data24.service;
1580
+ if(typeof data25 === "string"){
1581
+ if(!pattern2.test(data25)){
1582
+ const err60 = {instancePath:instancePath+"/dataTransferObjects/" + i4+"/services/" + i5+"/service",schemaPath:"#/definitions/dataTransferObject/properties/services/items/properties/service/pattern",keyword:"pattern",params:{pattern: "^artifact\\.[a-z][a-z0-9-]+\\.[a-z][a-z0-9-]+$"},message:"must match pattern \""+"^artifact\\.[a-z][a-z0-9-]+\\.[a-z][a-z0-9-]+$"+"\""};
1583
+ if(vErrors === null){
1584
+ vErrors = [err60];
1585
+ }
1586
+ else {
1587
+ vErrors.push(err60);
1588
+ }
1589
+ errors++;
1590
+ }
1591
+ }
1592
+ else {
1593
+ const err61 = {instancePath:instancePath+"/dataTransferObjects/" + i4+"/services/" + i5+"/service",schemaPath:"#/definitions/dataTransferObject/properties/services/items/properties/service/type",keyword:"type",params:{type: "string"},message:"must be string"};
1594
+ if(vErrors === null){
1595
+ vErrors = [err61];
1596
+ }
1597
+ else {
1598
+ vErrors.push(err61);
1599
+ }
1600
+ errors++;
1601
+ }
1602
+ }
1603
+ if(data24.position !== undefined){
1604
+ let data26 = data24.position;
1605
+ if(typeof data26 === "string"){
1606
+ if(func2(data26) < 1){
1607
+ const err62 = {instancePath:instancePath+"/dataTransferObjects/" + i4+"/services/" + i5+"/position",schemaPath:"#/definitions/dataTransferObject/properties/services/items/properties/position/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};
1608
+ if(vErrors === null){
1609
+ vErrors = [err62];
1610
+ }
1611
+ else {
1612
+ vErrors.push(err62);
1613
+ }
1614
+ errors++;
1615
+ }
1616
+ }
1617
+ else {
1618
+ const err63 = {instancePath:instancePath+"/dataTransferObjects/" + i4+"/services/" + i5+"/position",schemaPath:"#/definitions/dataTransferObject/properties/services/items/properties/position/type",keyword:"type",params:{type: "string"},message:"must be string"};
1619
+ if(vErrors === null){
1620
+ vErrors = [err63];
1621
+ }
1622
+ else {
1623
+ vErrors.push(err63);
1624
+ }
1625
+ errors++;
1626
+ }
1627
+ }
1628
+ }
1629
+ else {
1630
+ const err64 = {instancePath:instancePath+"/dataTransferObjects/" + i4+"/services/" + i5,schemaPath:"#/definitions/dataTransferObject/properties/services/items/type",keyword:"type",params:{type: "object"},message:"must be object"};
1631
+ if(vErrors === null){
1632
+ vErrors = [err64];
1633
+ }
1634
+ else {
1635
+ vErrors.push(err64);
1636
+ }
1637
+ errors++;
1638
+ }
1639
+ }
1640
+ }
1641
+ else {
1642
+ const err65 = {instancePath:instancePath+"/dataTransferObjects/" + i4+"/services",schemaPath:"#/definitions/dataTransferObject/properties/services/type",keyword:"type",params:{type: "array"},message:"must be array"};
1643
+ if(vErrors === null){
1644
+ vErrors = [err65];
1645
+ }
1646
+ else {
1647
+ vErrors.push(err65);
1648
+ }
1649
+ errors++;
1650
+ }
1651
+ }
1652
+ }
1653
+ else {
1654
+ const err66 = {instancePath:instancePath+"/dataTransferObjects/" + i4,schemaPath:"#/definitions/dataTransferObject/type",keyword:"type",params:{type: "object"},message:"must be object"};
1655
+ if(vErrors === null){
1656
+ vErrors = [err66];
1657
+ }
1658
+ else {
1659
+ vErrors.push(err66);
1660
+ }
1661
+ errors++;
1662
+ }
1663
+ }
1664
+ }
1665
+ else {
1666
+ const err67 = {instancePath:instancePath+"/dataTransferObjects",schemaPath:"#/properties/dataTransferObjects/type",keyword:"type",params:{type: "array"},message:"must be array"};
1667
+ if(vErrors === null){
1668
+ vErrors = [err67];
1669
+ }
1670
+ else {
1671
+ vErrors.push(err67);
1672
+ }
1673
+ errors++;
1674
+ }
1675
+ }
1676
+ if(data.qualificationKinds !== undefined){
1677
+ let data27 = data.qualificationKinds;
1678
+ if(Array.isArray(data27)){
1679
+ const len5 = data27.length;
1680
+ for(let i6=0; i6<len5; i6++){
1681
+ let data28 = data27[i6];
1682
+ if(typeof data28 === "string"){
1683
+ if(!pattern8.test(data28)){
1684
+ const err68 = {instancePath:instancePath+"/qualificationKinds/" + i6,schemaPath:"#/properties/qualificationKinds/items/pattern",keyword:"pattern",params:{pattern: "^[a-z][A-Za-z0-9]+$"},message:"must match pattern \""+"^[a-z][A-Za-z0-9]+$"+"\""};
1685
+ if(vErrors === null){
1686
+ vErrors = [err68];
1687
+ }
1688
+ else {
1689
+ vErrors.push(err68);
1690
+ }
1691
+ errors++;
1692
+ }
1693
+ }
1694
+ else {
1695
+ const err69 = {instancePath:instancePath+"/qualificationKinds/" + i6,schemaPath:"#/properties/qualificationKinds/items/type",keyword:"type",params:{type: "string"},message:"must be string"};
1696
+ if(vErrors === null){
1697
+ vErrors = [err69];
1698
+ }
1699
+ else {
1700
+ vErrors.push(err69);
1701
+ }
1702
+ errors++;
1703
+ }
1704
+ }
1705
+ let i7 = data27.length;
1706
+ let j1;
1707
+ if(i7 > 1){
1708
+ const indices1 = {};
1709
+ for(;i7--;){
1710
+ let item1 = data27[i7];
1711
+ if(typeof item1 !== "string"){
1712
+ continue;
1713
+ }
1714
+ if(typeof indices1[item1] == "number"){
1715
+ j1 = indices1[item1];
1716
+ const err70 = {instancePath:instancePath+"/qualificationKinds",schemaPath:"#/properties/qualificationKinds/uniqueItems",keyword:"uniqueItems",params:{i: i7, j: j1},message:"must NOT have duplicate items (items ## "+j1+" and "+i7+" are identical)"};
1717
+ if(vErrors === null){
1718
+ vErrors = [err70];
1719
+ }
1720
+ else {
1721
+ vErrors.push(err70);
1722
+ }
1723
+ errors++;
1724
+ break;
1725
+ }
1726
+ indices1[item1] = i7;
1727
+ }
1728
+ }
1729
+ }
1730
+ else {
1731
+ const err71 = {instancePath:instancePath+"/qualificationKinds",schemaPath:"#/properties/qualificationKinds/type",keyword:"type",params:{type: "array"},message:"must be array"};
1732
+ if(vErrors === null){
1733
+ vErrors = [err71];
1734
+ }
1735
+ else {
1736
+ vErrors.push(err71);
1737
+ }
1738
+ errors++;
1739
+ }
1740
+ }
1741
+ }
1742
+ else {
1743
+ const err72 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};
1744
+ if(vErrors === null){
1745
+ vErrors = [err72];
1746
+ }
1747
+ else {
1748
+ vErrors.push(err72);
1749
+ }
1750
+ errors++;
1751
+ }
1752
+ validate10.errors = vErrors;
1753
+ return errors === 0;
1754
+ }
1755
+
1756
+ export const schemaDigest = "sha256:f6ec0f4ffc4a761214a3b22c909a9e7b89a63064bc2c6dad91a691ff48f6db0d";