@tsed/schema 8.19.5 → 8.20.1

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.
@@ -296,6 +296,15 @@ export class JsonSchema extends Map {
296
296
  }
297
297
  return new JsonSchema(item);
298
298
  }
299
+ static add(property, method) {
300
+ Object.defineProperty(JsonSchema.prototype, property, {
301
+ value: method,
302
+ writable: false,
303
+ enumerable: false,
304
+ configurable: false
305
+ });
306
+ return this;
307
+ }
299
308
  /**
300
309
  * Check if the schema has a property.
301
310
  *
@@ -238,6 +238,7 @@ export declare class JsonSchema<T = JSONSchema7Type> extends Map<string, any> {
238
238
  * @returns A JsonSchema instance representing the input
239
239
  */
240
240
  static from(item: Partial<JsonSchemaObject> | Type<any> | JsonSchema | undefined): JsonSchema<JSONSchema7Type>;
241
+ static add<Keys extends keyof JsonSchema>(property: Keys, method: JsonSchema[Keys]): typeof JsonSchema;
241
242
  /**
242
243
  * Check if the schema has a property.
243
244
  *
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@tsed/schema",
3
3
  "description": "JsonSchema module for Ts.ED Framework",
4
4
  "type": "module",
5
- "version": "8.19.5",
5
+ "version": "8.20.1",
6
6
  "source": "./src/index.ts",
7
7
  "main": "./lib/esm/index.js",
8
8
  "module": "./lib/esm/index.js",
@@ -34,7 +34,7 @@
34
34
  "tsed"
35
35
  ],
36
36
  "dependencies": {
37
- "@tsed/openspec": "8.19.5",
37
+ "@tsed/openspec": "8.20.1",
38
38
  "change-case": "^5.4.4",
39
39
  "json-schema": "0.4.0",
40
40
  "picomatch": "4.0.2",
@@ -43,11 +43,11 @@
43
43
  },
44
44
  "devDependencies": {
45
45
  "@apidevtools/swagger-parser": "10.1.0",
46
- "@tsed/barrels": "8.19.5",
47
- "@tsed/core": "8.19.5",
48
- "@tsed/hooks": "8.19.5",
49
- "@tsed/openspec": "8.19.5",
50
- "@tsed/typescript": "8.19.5",
46
+ "@tsed/barrels": "8.20.1",
47
+ "@tsed/core": "8.20.1",
48
+ "@tsed/hooks": "8.20.1",
49
+ "@tsed/openspec": "8.20.1",
50
+ "@tsed/typescript": "8.20.1",
51
51
  "@types/fs-extra": "11.0.4",
52
52
  "@types/json-schema": "7.0.15",
53
53
  "@types/picomatch": "3.0.2",