@autobe/agent 0.30.4-dev.20260324 → 0.30.4

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.
@@ -62,35 +62,35 @@ var AutoBeJsonSchemaValidator;
62
62
  path: props.path,
63
63
  expected: "At most one dot(.) character allowed in type name",
64
64
  value: transform(props.key),
65
- description: utils_1.StringUtil.trim `
66
- JSON schema type name allows at most one dot(.) character to separate
67
- module name and interface name.
68
-
69
- However, current key name ${transform(JSON.stringify(props.key))}
70
- contains multiple dot(.) characters (${elements.length - 1} times).
71
-
72
- Change it to a valid type name with at most one dot(.) character at the next time.
73
- Note that, this is not a recommendation, but an instruction you must follow.
65
+ description: utils_1.StringUtil.trim `
66
+ JSON schema type name allows at most one dot(.) character to separate
67
+ module name and interface name.
68
+
69
+ However, current key name ${transform(JSON.stringify(props.key))}
70
+ contains multiple dot(.) characters (${elements.length - 1} times).
71
+
72
+ Change it to a valid type name with at most one dot(.) character at the next time.
73
+ Note that, this is not a recommendation, but an instruction you must follow.
74
74
  `,
75
75
  });
76
76
  if (elements.every(utils_2.NamingConvention.variable) === false)
77
77
  props.errors.push({
78
78
  path: props.path,
79
- expected: utils_1.StringUtil.trim `
80
- Valid variable name
81
-
82
- ${elements.map((s) => `- ${s}: ${utils_2.NamingConvention.variable(s) ? "valid" : "invalid"}`).join("\n")}
79
+ expected: utils_1.StringUtil.trim `
80
+ Valid variable name
81
+
82
+ ${elements.map((s) => `- ${s}: ${utils_2.NamingConvention.variable(s) ? "valid" : "invalid"}`).join("\n")}
83
83
  `,
84
84
  value: transform(props.key),
85
- description: utils_1.StringUtil.trim `
86
- JSON schema type name must be a valid variable name.
87
-
88
- Even though JSON schema type name allows dot(.) character, but
89
- each segment separated by dot(.) must be a valid variable name.
90
-
91
- Current key name ${transform(JSON.stringify(props.key))} is not valid.
92
- Change it to a valid variable name at the next time.
93
- Note that, this is not a recommendation, but an instruction you must follow.
85
+ description: utils_1.StringUtil.trim `
86
+ JSON schema type name must be a valid variable name.
87
+
88
+ Even though JSON schema type name allows dot(.) character, but
89
+ each segment separated by dot(.) must be a valid variable name.
90
+
91
+ Current key name ${transform(JSON.stringify(props.key))} is not valid.
92
+ Change it to a valid variable name at the next time.
93
+ Note that, this is not a recommendation, but an instruction you must follow.
94
94
  `,
95
95
  });
96
96
  if (props.key.endsWith(".IPage")) {
@@ -99,16 +99,16 @@ var AutoBeJsonSchemaValidator;
99
99
  path: props.path,
100
100
  expected: `"IPage" must be followed by another interface name. Use ${transform(JSON.stringify(expected))} instead.`,
101
101
  value: transform(props.key),
102
- description: utils_1.StringUtil.trim `
103
- "IPage" is a reserved type name for pagination response.
104
- The pagination data type name must be post-fixed after "IPage".
105
-
106
- However, you've defined ${transform(JSON.stringify(props.key))},
107
- post-fixing ".IPage" after the pagination data type name.
108
-
109
- Change it to a valid pagination type name to be
110
- ${transform(JSON.stringify(expected))} at the next time.
111
- Note that, this is not a recommendation, but an instruction you must follow.
102
+ description: utils_1.StringUtil.trim `
103
+ "IPage" is a reserved type name for pagination response.
104
+ The pagination data type name must be post-fixed after "IPage".
105
+
106
+ However, you've defined ${transform(JSON.stringify(props.key))},
107
+ post-fixing ".IPage" after the pagination data type name.
108
+
109
+ Change it to a valid pagination type name to be
110
+ ${transform(JSON.stringify(expected))} at the next time.
111
+ Note that, this is not a recommendation, but an instruction you must follow.
112
112
  `,
113
113
  });
114
114
  }
@@ -117,13 +117,13 @@ var AutoBeJsonSchemaValidator;
117
117
  path: props.path,
118
118
  expected: `"IPageIRequest" is a mistake. Use "IPage.IRequest" instead.`,
119
119
  value: transform(props.key),
120
- description: utils_1.StringUtil.trim `
121
- You've taken a mistake that defines "${transform("IPageIRequest")}" as a type name.
122
- However, as you've intended to define a pagination request type,
123
- the correct type name is "${transform("IPage.IRequest")}" instead of "${transform("IPageIRequest")}".
124
-
125
- Change it to "${transform("IPage.IRequest")}" at the next time.
126
- Note that, this is not a recommendation, but an instruction you must follow.
120
+ description: utils_1.StringUtil.trim `
121
+ You've taken a mistake that defines "${transform("IPageIRequest")}" as a type name.
122
+ However, as you've intended to define a pagination request type,
123
+ the correct type name is "${transform("IPage.IRequest")}" instead of "${transform("IPageIRequest")}".
124
+
125
+ Change it to "${transform("IPage.IRequest")}" at the next time.
126
+ Note that, this is not a recommendation, but an instruction you must follow.
127
127
  `,
128
128
  });
129
129
  if (props.key.startsWith("IPage") &&
@@ -139,19 +139,19 @@ var AutoBeJsonSchemaValidator;
139
139
  path: props.path,
140
140
  expected: `Interface name starting with 'I' even after 'IPage': ${JSON.stringify(expected)}`,
141
141
  value: transform(props.key),
142
- description: utils_1.StringUtil.trim `
143
- JSON schema type name must be an interface name starting with 'I'.
144
- Even though JSON schema type name allows dot(.) character, but
145
- each segment separated by dot(.) must be an interface name starting
146
- with 'I'.
147
-
148
- Even in the case of pagination response, after 'IPage' prefix,
149
- the remaining part must be an interface name starting with 'I'.
150
-
151
- Current key name ${JSON.stringify(props.key)} is not valid. Change
152
- it to a valid interface name to be ${JSON.stringify(expected)},
153
- or change it to another valid interface name at the next time.
154
- Note that, this is not a recommendation, but an instruction you must follow.
142
+ description: utils_1.StringUtil.trim `
143
+ JSON schema type name must be an interface name starting with 'I'.
144
+ Even though JSON schema type name allows dot(.) character, but
145
+ each segment separated by dot(.) must be an interface name starting
146
+ with 'I'.
147
+
148
+ Even in the case of pagination response, after 'IPage' prefix,
149
+ the remaining part must be an interface name starting with 'I'.
150
+
151
+ Current key name ${JSON.stringify(props.key)} is not valid. Change
152
+ it to a valid interface name to be ${JSON.stringify(expected)},
153
+ or change it to another valid interface name at the next time.
154
+ Note that, this is not a recommendation, but an instruction you must follow.
155
155
  `,
156
156
  });
157
157
  }
@@ -163,17 +163,17 @@ var AutoBeJsonSchemaValidator;
163
163
  path: props.path,
164
164
  expected: `Interface name starting with 'I': ${JSON.stringify(expected)}`,
165
165
  value: transform(props.key),
166
- description: utils_1.StringUtil.trim `
167
- JSON schema type name must be an interface name starting with 'I'.
168
- Even though JSON schema type name allows dot(.) character, but
169
- each segment separated by dot(.) must be an interface name starting
170
- with 'I'.
171
-
172
- Current key name ${transform(JSON.stringify(props.key))} is not valid.
173
- Change it to a valid interface name to be ${transform(JSON.stringify(expected))},
174
- or change it to another valid interface name at the next time.
175
-
176
- Note that, this is not a recommendation, but an instruction you must follow.
166
+ description: utils_1.StringUtil.trim `
167
+ JSON schema type name must be an interface name starting with 'I'.
168
+ Even though JSON schema type name allows dot(.) character, but
169
+ each segment separated by dot(.) must be an interface name starting
170
+ with 'I'.
171
+
172
+ Current key name ${transform(JSON.stringify(props.key))} is not valid.
173
+ Change it to a valid interface name to be ${transform(JSON.stringify(expected))},
174
+ or change it to another valid interface name at the next time.
175
+
176
+ Note that, this is not a recommendation, but an instruction you must follow.
177
177
  `,
178
178
  });
179
179
  }
@@ -187,27 +187,27 @@ var AutoBeJsonSchemaValidator;
187
187
  path: props.path,
188
188
  expected: JSON.stringify(`${elements[0].replace("Session", "")}.${elements[1]}`),
189
189
  value: transform(props.key),
190
- description: utils_1.StringUtil.trim `
191
- You have attached ${elements[1]} to a Session type ${transform(JSON.stringify(props.key))},
192
- but this is architecturally incorrect.
193
-
194
- In production authentication systems, Actor and Session are separate concepts:
195
- - **Actor** (e.g., User, Seller, Admin): The persistent user identity that performs
196
- authentication actions - joining (registering), logging in, and receiving authorized tokens.
197
- - **Session** (e.g., UserSession, SellerSession): The temporary authentication state that
198
- tracks active login instances. Sessions are CREATED as a result of join/login operations,
199
- but they do not perform these actions themselves.
200
-
201
- Think about it semantically: An ACTOR joins the system and logs in. A SESSION is merely
202
- a record that gets created when the actor authenticates. It makes no sense for a session
203
- to "join" or "login" - only actors do that.
204
-
205
- Therefore, authentication-related DTO types (IJoin, ILogin, IAuthorized, IRefresh) MUST
206
- be attached to the Actor type, NEVER to the Session type.
207
-
208
- Change ${transform(JSON.stringify(props.key))} to ${transform(JSON.stringify(`${elements[0].replace("Session", "")}.${elements[1]}`))} at the next time.
209
-
210
- Note that, this is not a recommendation, but an instruction you must follow.
190
+ description: utils_1.StringUtil.trim `
191
+ You have attached ${elements[1]} to a Session type ${transform(JSON.stringify(props.key))},
192
+ but this is architecturally incorrect.
193
+
194
+ In production authentication systems, Actor and Session are separate concepts:
195
+ - **Actor** (e.g., User, Seller, Admin): The persistent user identity that performs
196
+ authentication actions - joining (registering), logging in, and receiving authorized tokens.
197
+ - **Session** (e.g., UserSession, SellerSession): The temporary authentication state that
198
+ tracks active login instances. Sessions are CREATED as a result of join/login operations,
199
+ but they do not perform these actions themselves.
200
+
201
+ Think about it semantically: An ACTOR joins the system and logs in. A SESSION is merely
202
+ a record that gets created when the actor authenticates. It makes no sense for a session
203
+ to "join" or "login" - only actors do that.
204
+
205
+ Therefore, authentication-related DTO types (IJoin, ILogin, IAuthorized, IRefresh) MUST
206
+ be attached to the Actor type, NEVER to the Session type.
207
+
208
+ Change ${transform(JSON.stringify(props.key))} to ${transform(JSON.stringify(`${elements[0].replace("Session", "")}.${elements[1]}`))} at the next time.
209
+
210
+ Note that, this is not a recommendation, but an instruction you must follow.
211
211
  `,
212
212
  });
213
213
  };
@@ -268,20 +268,20 @@ var AutoBeJsonSchemaValidator;
268
268
  .map((s) => JSON.stringify(`#/components/schemas/${s}`))
269
269
  .join(" | "),
270
270
  value: key,
271
- description: utils_1.StringUtil.trim `
272
- You've referenced an authorization-related type ${JSON.stringify(key)}
273
- that is not used in any operation's requestBody or responseBody.
274
-
275
- Authorization-related types must be used in at least one operation's
276
- requestBody or responseBody. Make sure to use the type appropriately
277
- in your API design.
278
-
279
- Existing authorization-related types used in operations are:
271
+ description: utils_1.StringUtil.trim `
272
+ You've referenced an authorization-related type ${JSON.stringify(key)}
273
+ that is not used in any operation's requestBody or responseBody.
274
+
275
+ Authorization-related types must be used in at least one operation's
276
+ requestBody or responseBody. Make sure to use the type appropriately
277
+ in your API design.
278
+
279
+ Existing authorization-related types used in operations are:
280
280
  - ${Array.from(candidates)
281
281
  .map((s) => `#/components/schemas/${s}`)
282
- .join("\n- ")}
283
-
284
- Note that, this is not a recommendation, but an instruction you must follow.
282
+ .join("\n- ")}
283
+
284
+ Note that, this is not a recommendation, but an instruction you must follow.
285
285
  `,
286
286
  });
287
287
  },
@@ -296,61 +296,61 @@ var AutoBeJsonSchemaValidator;
296
296
  });
297
297
  if (utils_1.AutoBeOpenApiTypeChecker.isReference(props.schema) &&
298
298
  props.schema.$ref === `#/components/schemas/${props.typeName}`)
299
- report(utils_1.StringUtil.trim `
300
- You have defined a nonsensible type like below:
301
-
302
- \`\`\`typescript
303
- type ${props.typeName} = ${props.typeName};
304
- \`\`\`
305
-
306
- This is an infinite recursive type definition that cannot exist in any
307
- programming language. A type cannot be defined as itself - this creates
308
- a circular definition with no base case, making the type impossible to
309
- instantiate or validate.
310
-
311
- If you need tree or graph structures, use explicit relationships with
312
- ID references (e.g., parentId: string) instead of recursive type definitions.
313
- Remove the self-reference and redesign the schema at the next time.
314
- Note that, this is not a recommendation, but an instruction you must follow.
299
+ report(utils_1.StringUtil.trim `
300
+ You have defined a nonsensible type like below:
301
+
302
+ \`\`\`typescript
303
+ type ${props.typeName} = ${props.typeName};
304
+ \`\`\`
305
+
306
+ This is an infinite recursive type definition that cannot exist in any
307
+ programming language. A type cannot be defined as itself - this creates
308
+ a circular definition with no base case, making the type impossible to
309
+ instantiate or validate.
310
+
311
+ If you need tree or graph structures, use explicit relationships with
312
+ ID references (e.g., parentId: string) instead of recursive type definitions.
313
+ Remove the self-reference and redesign the schema at the next time.
314
+ Note that, this is not a recommendation, but an instruction you must follow.
315
315
  `);
316
316
  else if (utils_1.AutoBeOpenApiTypeChecker.isArray(props.schema) &&
317
317
  utils_1.AutoBeOpenApiTypeChecker.isReference(props.schema.items) &&
318
318
  props.schema.items.$ref === `#/components/schemas/${props.typeName}`)
319
- report(utils_1.StringUtil.trim `
320
- You have defined a nonsensible type like below:
321
-
322
- \`\`\`typescript
323
- type ${props.typeName} = Array<${props.typeName}>;
324
- \`\`\`
325
-
326
- This is an infinite recursive array type that cannot exist in any
327
- programming language. An array of itself creates a circular definition
328
- with no base case, making the type impossible to instantiate or validate.
329
-
330
- If you need nested structures, define explicit depth levels with separate
331
- types, or use parent-child relationships with ID references.
332
- Remove the self-reference and redesign the schema at the next time.
333
- Note that, this is not a recommendation, but an instruction you must follow.
319
+ report(utils_1.StringUtil.trim `
320
+ You have defined a nonsensible type like below:
321
+
322
+ \`\`\`typescript
323
+ type ${props.typeName} = Array<${props.typeName}>;
324
+ \`\`\`
325
+
326
+ This is an infinite recursive array type that cannot exist in any
327
+ programming language. An array of itself creates a circular definition
328
+ with no base case, making the type impossible to instantiate or validate.
329
+
330
+ If you need nested structures, define explicit depth levels with separate
331
+ types, or use parent-child relationships with ID references.
332
+ Remove the self-reference and redesign the schema at the next time.
333
+ Note that, this is not a recommendation, but an instruction you must follow.
334
334
  `);
335
335
  else if (utils_1.AutoBeOpenApiTypeChecker.isOneOf(props.schema) &&
336
336
  props.schema.oneOf.some((v) => utils_1.AutoBeOpenApiTypeChecker.isReference(v) &&
337
337
  v.$ref === `#/components/schemas/${props.typeName}`) === true)
338
- report(utils_1.StringUtil.trim `
339
- You have defined a nonsensible type like below:
340
-
341
- \`\`\`typescript
342
- type ${props.typeName} = ${props.typeName} | ...;
343
- \`\`\`
344
-
345
- This is an infinite recursive union type that cannot exist in any
346
- programming language. A union that includes itself as a variant creates
347
- a circular definition with no base case, making the type impossible to
348
- instantiate or validate.
349
-
350
- If you need polymorphic hierarchies, define separate concrete types for
351
- each variant without including the union type itself as a variant.
352
- Remove the self-reference and redesign the schema at the next time.
353
- Note that, this is not a recommendation, but an instruction you must follow.
338
+ report(utils_1.StringUtil.trim `
339
+ You have defined a nonsensible type like below:
340
+
341
+ \`\`\`typescript
342
+ type ${props.typeName} = ${props.typeName} | ...;
343
+ \`\`\`
344
+
345
+ This is an infinite recursive union type that cannot exist in any
346
+ programming language. A union that includes itself as a variant creates
347
+ a circular definition with no base case, making the type impossible to
348
+ instantiate or validate.
349
+
350
+ If you need polymorphic hierarchies, define separate concrete types for
351
+ each variant without including the union type itself as a variant.
352
+ Remove the self-reference and redesign the schema at the next time.
353
+ Note that, this is not a recommendation, but an instruction you must follow.
354
354
  `);
355
355
  else if (utils_1.AutoBeOpenApiTypeChecker.isObject(props.schema) &&
356
356
  props.schema.properties &&
@@ -358,28 +358,28 @@ var AutoBeJsonSchemaValidator;
358
358
  Object.entries(props.schema.properties).some(([k, v]) => utils_1.AutoBeOpenApiTypeChecker.isReference(v) &&
359
359
  v.$ref === `#/components/schemas/${props.typeName}` &&
360
360
  props.schema.required.includes(k)))
361
- report(utils_1.StringUtil.trim `
362
- You have defined a nonsensible type like below:
363
-
364
- \`\`\`typescript
365
- interface ${props.typeName} {
366
- someProperty: ${props.typeName}; // required, non-nullable
367
- }
368
- \`\`\`
369
-
370
- This is an infinite recursive object type that cannot exist in any
371
- programming language. A required non-nullable property referencing its
372
- own type creates a circular definition with no base case, making the
373
- type impossible to instantiate.
374
-
375
- To create an instance of ${props.typeName}, you would need an instance of ${props.typeName},
376
- which requires another instance of ${props.typeName}, infinitely. This is logically
377
- impossible.
378
-
379
- If you need parent-child or graph relationships, make the self-referencing
380
- property either nullable or optional, or use ID references (e.g., parentId: string).
381
- Remove the required self-reference and redesign the schema at the next time.
382
- Note that, this is not a recommendation, but an instruction you must follow.
361
+ report(utils_1.StringUtil.trim `
362
+ You have defined a nonsensible type like below:
363
+
364
+ \`\`\`typescript
365
+ interface ${props.typeName} {
366
+ someProperty: ${props.typeName}; // required, non-nullable
367
+ }
368
+ \`\`\`
369
+
370
+ This is an infinite recursive object type that cannot exist in any
371
+ programming language. A required non-nullable property referencing its
372
+ own type creates a circular definition with no base case, making the
373
+ type impossible to instantiate.
374
+
375
+ To create an instance of ${props.typeName}, you would need an instance of ${props.typeName},
376
+ which requires another instance of ${props.typeName}, infinitely. This is logically
377
+ impossible.
378
+
379
+ If you need parent-child or graph relationships, make the self-referencing
380
+ property either nullable or optional, or use ID references (e.g., parentId: string).
381
+ Remove the required self-reference and redesign the schema at the next time.
382
+ Note that, this is not a recommendation, but an instruction you must follow.
383
383
  `);
384
384
  };
385
385
  const validateObjectType = (props) => {
@@ -398,23 +398,23 @@ var AutoBeJsonSchemaValidator;
398
398
  path: props.path,
399
399
  expected: `AutoBeOpenApi.IJsonSchemaDescriptive.IObject`,
400
400
  value: schema,
401
- description: utils_1.StringUtil.trim `
402
- Root schema types (used in requestBody or responseBody of operations)
403
- must be defined as object types.
404
-
405
- This is the rule enforced to ensure consistent API design and to facilitate easier data handling.
406
- Even though you think that defining a non-object type is more convenient for your specific use case,
407
- just follow the rule without any resistance.
408
-
409
- Note that, this is not a recommendation, but an instruction you must follow.
410
-
411
- If current type is hard to be defined as an object type, just wrap it in an object type like below:
412
-
413
- \`\`\`typescript
414
- {
415
- value: T;
416
- }
417
- \`\`\`
401
+ description: utils_1.StringUtil.trim `
402
+ Root schema types (used in requestBody or responseBody of operations)
403
+ must be defined as object types.
404
+
405
+ This is the rule enforced to ensure consistent API design and to facilitate easier data handling.
406
+ Even though you think that defining a non-object type is more convenient for your specific use case,
407
+ just follow the rule without any resistance.
408
+
409
+ Note that, this is not a recommendation, but an instruction you must follow.
410
+
411
+ If current type is hard to be defined as an object type, just wrap it in an object type like below:
412
+
413
+ \`\`\`typescript
414
+ {
415
+ value: T;
416
+ }
417
+ \`\`\`
418
418
  `,
419
419
  });
420
420
  else if (key.endsWith(".IRequest") ||
@@ -429,22 +429,22 @@ var AutoBeJsonSchemaValidator;
429
429
  path: props.path,
430
430
  expected: `AutoBeOpenApi.IJsonSchemaDescriptive.IObject`,
431
431
  value: schema,
432
- description: utils_1.StringUtil.trim `
433
- DTO type of .${key.split(".").pop()} suffix must be defined as an object type.
434
-
435
- This is the rule enforced to ensure consistent API design and to facilitate easier data handling.
436
- Even though you think that defining a non-object type is more convenient for your specific use case,
437
- just follow the rule without any resistance.
438
-
439
- Note that, this is not a recommendation, but an instruction you must follow.
440
-
441
- If current type is hard to be defined as an object type, just wrap it in an object type like below:
442
-
443
- \`\`\`typescript
444
- {
445
- value: T;
446
- }
447
- \`\`\`
432
+ description: utils_1.StringUtil.trim `
433
+ DTO type of .${key.split(".").pop()} suffix must be defined as an object type.
434
+
435
+ This is the rule enforced to ensure consistent API design and to facilitate easier data handling.
436
+ Even though you think that defining a non-object type is more convenient for your specific use case,
437
+ just follow the rule without any resistance.
438
+
439
+ Note that, this is not a recommendation, but an instruction you must follow.
440
+
441
+ If current type is hard to be defined as an object type, just wrap it in an object type like below:
442
+
443
+ \`\`\`typescript
444
+ {
445
+ value: T;
446
+ }
447
+ \`\`\`
448
448
  `,
449
449
  });
450
450
  };
@@ -463,27 +463,27 @@ var AutoBeJsonSchemaValidator;
463
463
  if (inspect(value) === false)
464
464
  props.errors.push({
465
465
  path: accessor,
466
- expected: utils_1.StringUtil.trim `
467
- | { type: "string"; format: "uuid"; description: string; }
468
- | {
469
- oneOf: [
470
- { type: "string"; format: "uuid"; },
471
- { type: "null"; },
472
- ];
473
- description: string;
466
+ expected: utils_1.StringUtil.trim `
467
+ | { type: "string"; format: "uuid"; description: string; }
468
+ | {
469
+ oneOf: [
470
+ { type: "string"; format: "uuid"; },
471
+ { type: "null"; },
472
+ ];
473
+ description: string;
474
474
  }`,
475
475
  value,
476
- description: utils_1.StringUtil.trim `
477
- Property names "id" or ending with "_id" must be defined as
478
- UUID string type, or nullable UUID string type.
479
-
480
- This is the rule enforced to ensure consistent identification of
481
- resources across the API. Even though you think that defining a
482
- different type is more convenient for your specific use case,
483
- just follow the rule without any resistance.
484
-
485
- Note that, this is not a recommendation, but an instruction you
486
- must follow.
476
+ description: utils_1.StringUtil.trim `
477
+ Property names "id" or ending with "_id" must be defined as
478
+ UUID string type, or nullable UUID string type.
479
+
480
+ This is the rule enforced to ensure consistent identification of
481
+ resources across the API. Even though you think that defining a
482
+ different type is more convenient for your specific use case,
483
+ just follow the rule without any resistance.
484
+
485
+ Note that, this is not a recommendation, but an instruction you
486
+ must follow.
487
487
  `,
488
488
  });
489
489
  }
@@ -497,17 +497,17 @@ var AutoBeJsonSchemaValidator;
497
497
  path: `${props.path}.properties${utils_2.NamingConvention.variable(key) ? `.${key}` : `[${JSON.stringify(key)}]`}`,
498
498
  expected: `none system reserved word`,
499
499
  value: key,
500
- description: utils_1.StringUtil.trim `
501
- Property name ${JSON.stringify(key)} is a system reserved word.
502
-
503
- Avoid using system reserved words as property names to prevent
504
- potential conflicts and ensure clarity in your API design.
505
-
506
- Change the property name ${JSON.stringify(key)} to a non-reserved
507
- word at the next time.
508
-
509
- Note that, this is not a recommendation, but an instruction you
510
- must follow.
500
+ description: utils_1.StringUtil.trim `
501
+ Property name ${JSON.stringify(key)} is a system reserved word.
502
+
503
+ Avoid using system reserved words as property names to prevent
504
+ potential conflicts and ensure clarity in your API design.
505
+
506
+ Change the property name ${JSON.stringify(key)} to a non-reserved
507
+ word at the next time.
508
+
509
+ Note that, this is not a recommendation, but an instruction you
510
+ must follow.
511
511
  `,
512
512
  });
513
513
  else if (utils_2.NamingConvention.variable(key) === false)
@@ -515,18 +515,18 @@ var AutoBeJsonSchemaValidator;
515
515
  path: `${props.path}.properties${utils_2.NamingConvention.variable(key) ? `.${key}` : `[${JSON.stringify(key)}]`}`,
516
516
  expected: `valid variable name`,
517
517
  value: key,
518
- description: utils_1.StringUtil.trim `
519
- Property name ${JSON.stringify(key)} must be a valid variable name.
520
-
521
- Valid variable names start with a letter, underscore (_), or dollar sign ($),
522
- followed by letters, digits, underscores, or dollar signs. They cannot
523
- contain spaces or special characters.
524
-
525
- Change the property name ${JSON.stringify(key)} to a valid variable
526
- name at the next time.
527
-
528
- Note that, this is not a recommendation, but an instruction you
529
- must follow.
518
+ description: utils_1.StringUtil.trim `
519
+ Property name ${JSON.stringify(key)} must be a valid variable name.
520
+
521
+ Valid variable names start with a letter, underscore (_), or dollar sign ($),
522
+ followed by letters, digits, underscores, or dollar signs. They cannot
523
+ contain spaces or special characters.
524
+
525
+ Change the property name ${JSON.stringify(key)} to a valid variable
526
+ name at the next time.
527
+
528
+ Note that, this is not a recommendation, but an instruction you
529
+ must follow.
530
530
  `,
531
531
  });
532
532
  }
@@ -546,12 +546,12 @@ var AutoBeJsonSchemaValidator;
546
546
  path: accessor,
547
547
  expected: "minimum <= maximum",
548
548
  value: schema,
549
- description: utils_1.StringUtil.trim `
550
- Invalid numeric range: minimum (${minimum}) is greater than maximum (${maximum}).
551
-
552
- This creates an impossible range where no value can satisfy both constraints.
553
- Either increase maximum or decrease minimum to create a valid range.
554
- Note that, this is not a recommendation, but an instruction you must follow.
549
+ description: utils_1.StringUtil.trim `
550
+ Invalid numeric range: minimum (${minimum}) is greater than maximum (${maximum}).
551
+
552
+ This creates an impossible range where no value can satisfy both constraints.
553
+ Either increase maximum or decrease minimum to create a valid range.
554
+ Note that, this is not a recommendation, but an instruction you must follow.
555
555
  `,
556
556
  });
557
557
  // Case 2: exclusiveMinimum >= exclusiveMaximum
@@ -562,13 +562,13 @@ var AutoBeJsonSchemaValidator;
562
562
  path: accessor,
563
563
  expected: "exclusiveMinimum < exclusiveMaximum",
564
564
  value: schema,
565
- description: utils_1.StringUtil.trim `
566
- Invalid numeric range: exclusiveMinimum (${exclusiveMinimum}) is greater than
567
- or equal to exclusiveMaximum (${exclusiveMaximum}).
568
-
569
- This creates an impossible range where no value can satisfy both constraints.
570
- Either increase exclusiveMaximum or decrease exclusiveMinimum to create a valid range.
571
- Note that, this is not a recommendation, but an instruction you must follow.
565
+ description: utils_1.StringUtil.trim `
566
+ Invalid numeric range: exclusiveMinimum (${exclusiveMinimum}) is greater than
567
+ or equal to exclusiveMaximum (${exclusiveMaximum}).
568
+
569
+ This creates an impossible range where no value can satisfy both constraints.
570
+ Either increase exclusiveMaximum or decrease exclusiveMinimum to create a valid range.
571
+ Note that, this is not a recommendation, but an instruction you must follow.
572
572
  `,
573
573
  });
574
574
  // Case 3: minimum >= exclusiveMaximum
@@ -579,14 +579,14 @@ var AutoBeJsonSchemaValidator;
579
579
  path: accessor,
580
580
  expected: "minimum < exclusiveMaximum",
581
581
  value: schema,
582
- description: utils_1.StringUtil.trim `
583
- Invalid numeric range: minimum (${minimum}) is greater than or equal to
584
- exclusiveMaximum (${exclusiveMaximum}).
585
-
586
- This creates an impossible range. A value cannot be >= ${minimum} and < ${exclusiveMaximum}
587
- at the same time when minimum >= exclusiveMaximum.
588
- Either increase exclusiveMaximum or decrease minimum to create a valid range.
589
- Note that, this is not a recommendation, but an instruction you must follow.
582
+ description: utils_1.StringUtil.trim `
583
+ Invalid numeric range: minimum (${minimum}) is greater than or equal to
584
+ exclusiveMaximum (${exclusiveMaximum}).
585
+
586
+ This creates an impossible range. A value cannot be >= ${minimum} and < ${exclusiveMaximum}
587
+ at the same time when minimum >= exclusiveMaximum.
588
+ Either increase exclusiveMaximum or decrease minimum to create a valid range.
589
+ Note that, this is not a recommendation, but an instruction you must follow.
590
590
  `,
591
591
  });
592
592
  // Case 4: exclusiveMinimum >= maximum
@@ -597,14 +597,14 @@ var AutoBeJsonSchemaValidator;
597
597
  path: accessor,
598
598
  expected: "exclusiveMinimum < maximum",
599
599
  value: schema,
600
- description: utils_1.StringUtil.trim `
601
- Invalid numeric range: exclusiveMinimum (${exclusiveMinimum}) is greater than
602
- or equal to maximum (${maximum}).
603
-
604
- This creates an impossible range. A value cannot be > ${exclusiveMinimum} and <= ${maximum}
605
- at the same time when exclusiveMinimum >= maximum.
606
- Either increase maximum or decrease exclusiveMinimum to create a valid range.
607
- Note that, this is not a recommendation, but an instruction you must follow.
600
+ description: utils_1.StringUtil.trim `
601
+ Invalid numeric range: exclusiveMinimum (${exclusiveMinimum}) is greater than
602
+ or equal to maximum (${maximum}).
603
+
604
+ This creates an impossible range. A value cannot be > ${exclusiveMinimum} and <= ${maximum}
605
+ at the same time when exclusiveMinimum >= maximum.
606
+ Either increase maximum or decrease exclusiveMinimum to create a valid range.
607
+ Note that, this is not a recommendation, but an instruction you must follow.
608
608
  `,
609
609
  });
610
610
  // Case 5: minimum === maximum with exclusive constraints
@@ -616,14 +616,14 @@ var AutoBeJsonSchemaValidator;
616
616
  path: accessor,
617
617
  expected: "no exclusive constraints when minimum equals maximum",
618
618
  value: schema,
619
- description: utils_1.StringUtil.trim `
620
- Invalid numeric range: minimum equals maximum (${minimum}), but exclusive
621
- constraints are also defined.
622
-
623
- When minimum === maximum, the only valid value is exactly ${minimum}.
624
- Adding exclusiveMinimum or exclusiveMaximum makes this impossible.
625
- Remove the exclusive constraints or adjust minimum/maximum to create a valid range.
626
- Note that, this is not a recommendation, but an instruction you must follow.
619
+ description: utils_1.StringUtil.trim `
620
+ Invalid numeric range: minimum equals maximum (${minimum}), but exclusive
621
+ constraints are also defined.
622
+
623
+ When minimum === maximum, the only valid value is exactly ${minimum}.
624
+ Adding exclusiveMinimum or exclusiveMaximum makes this impossible.
625
+ Remove the exclusive constraints or adjust minimum/maximum to create a valid range.
626
+ Note that, this is not a recommendation, but an instruction you must follow.
627
627
  `,
628
628
  });
629
629
  // Case 6: negative multipleOf
@@ -632,12 +632,12 @@ var AutoBeJsonSchemaValidator;
632
632
  path: accessor,
633
633
  expected: "multipleOf > 0",
634
634
  value: schema,
635
- description: utils_1.StringUtil.trim `
636
- Invalid multipleOf value: ${schema.multipleOf}.
637
-
638
- The multipleOf constraint must be a positive number greater than zero.
639
- Change multipleOf to a positive value.
640
- Note that, this is not a recommendation, but an instruction you must follow.
635
+ description: utils_1.StringUtil.trim `
636
+ Invalid multipleOf value: ${schema.multipleOf}.
637
+
638
+ The multipleOf constraint must be a positive number greater than zero.
639
+ Change multipleOf to a positive value.
640
+ Note that, this is not a recommendation, but an instruction you must follow.
641
641
  `,
642
642
  });
643
643
  },