@tsed/schema 6.95.7 → 6.96.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. package/lib/cjs/domain/JsonSchema.js +17 -4
  2. package/lib/cjs/domain/JsonSchema.js.map +1 -1
  3. package/lib/esm/domain/JsonSchema.js +17 -4
  4. package/lib/esm/domain/JsonSchema.js.map +1 -1
  5. package/package.json +5 -5
  6. package/lib/cjs/components/anyMapper.d.ts +0 -2
  7. package/lib/cjs/components/classMapper.d.ts +0 -3
  8. package/lib/cjs/components/genericsMapper.d.ts +0 -5
  9. package/lib/cjs/components/index.d.ts +0 -11
  10. package/lib/cjs/components/inheritedClassMapper.d.ts +0 -5
  11. package/lib/cjs/components/itemMapper.d.ts +0 -2
  12. package/lib/cjs/components/lazyRefMapper.d.ts +0 -3
  13. package/lib/cjs/components/mapMapper.d.ts +0 -9
  14. package/lib/cjs/components/objectMapper.d.ts +0 -8
  15. package/lib/cjs/components/ofMapper.d.ts +0 -3
  16. package/lib/cjs/components/propertiesMapper.d.ts +0 -3
  17. package/lib/cjs/components/schemaMapper.d.ts +0 -3
  18. package/lib/cjs/constants/httpMethods.d.ts +0 -12
  19. package/lib/cjs/constants/httpStatusMessages.d.ts +0 -272
  20. package/lib/cjs/decorators/class/children.d.ts +0 -11
  21. package/lib/cjs/decorators/collections/collectionContains.d.ts +0 -21
  22. package/lib/cjs/decorators/collections/collectionOf.d.ts +0 -101
  23. package/lib/cjs/decorators/collections/maxItems.d.ts +0 -47
  24. package/lib/cjs/decorators/collections/maxProperties.d.ts +0 -70
  25. package/lib/cjs/decorators/collections/minItems.d.ts +0 -51
  26. package/lib/cjs/decorators/collections/minProperties.d.ts +0 -69
  27. package/lib/cjs/decorators/collections/uniqueItems.d.ts +0 -50
  28. package/lib/cjs/decorators/common/additionalProperties.d.ts +0 -11
  29. package/lib/cjs/decorators/common/allOf.d.ts +0 -13
  30. package/lib/cjs/decorators/common/allow.d.ts +0 -28
  31. package/lib/cjs/decorators/common/any.d.ts +0 -38
  32. package/lib/cjs/decorators/common/anyOf.d.ts +0 -17
  33. package/lib/cjs/decorators/common/const.d.ts +0 -61
  34. package/lib/cjs/decorators/common/customKey.d.ts +0 -26
  35. package/lib/cjs/decorators/common/default.d.ts +0 -41
  36. package/lib/cjs/decorators/common/description.d.ts +0 -53
  37. package/lib/cjs/decorators/common/enum.d.ts +0 -98
  38. package/lib/cjs/decorators/common/example.d.ts +0 -11
  39. package/lib/cjs/decorators/common/examples.d.ts +0 -12
  40. package/lib/cjs/decorators/common/exclusiveMaximum.d.ts +0 -69
  41. package/lib/cjs/decorators/common/exclusiveMinimum.d.ts +0 -69
  42. package/lib/cjs/decorators/common/format.d.ts +0 -459
  43. package/lib/cjs/decorators/common/forwardGroups.d.ts +0 -10
  44. package/lib/cjs/decorators/common/groups.d.ts +0 -11
  45. package/lib/cjs/decorators/common/hidden.d.ts +0 -32
  46. package/lib/cjs/decorators/common/ignore.d.ts +0 -58
  47. package/lib/cjs/decorators/common/integer.d.ts +0 -61
  48. package/lib/cjs/decorators/common/jsonEntityFn.d.ts +0 -21
  49. package/lib/cjs/decorators/common/maxLength.d.ts +0 -76
  50. package/lib/cjs/decorators/common/maximum.d.ts +0 -138
  51. package/lib/cjs/decorators/common/minLength.d.ts +0 -77
  52. package/lib/cjs/decorators/common/minimum.d.ts +0 -136
  53. package/lib/cjs/decorators/common/multipleOf.d.ts +0 -68
  54. package/lib/cjs/decorators/common/name.d.ts +0 -32
  55. package/lib/cjs/decorators/common/nullable.d.ts +0 -25
  56. package/lib/cjs/decorators/common/oneOf.d.ts +0 -17
  57. package/lib/cjs/decorators/common/optional.d.ts +0 -10
  58. package/lib/cjs/decorators/common/pattern.d.ts +0 -93
  59. package/lib/cjs/decorators/common/property.d.ts +0 -11
  60. package/lib/cjs/decorators/common/readOnly.d.ts +0 -11
  61. package/lib/cjs/decorators/common/required.d.ts +0 -44
  62. package/lib/cjs/decorators/common/requiredGroups.d.ts +0 -10
  63. package/lib/cjs/decorators/common/schema.d.ts +0 -53
  64. package/lib/cjs/decorators/common/title.d.ts +0 -39
  65. package/lib/cjs/decorators/common/writeOnly.d.ts +0 -11
  66. package/lib/cjs/decorators/config/jsonEntityComponent.d.ts +0 -10
  67. package/lib/cjs/decorators/generics/genericOf.d.ts +0 -76
  68. package/lib/cjs/decorators/generics/generics.d.ts +0 -14
  69. package/lib/cjs/decorators/index.d.ts +0 -68
  70. package/lib/cjs/decorators/operations/consumes.d.ts +0 -19
  71. package/lib/cjs/decorators/operations/contentType.d.ts +0 -20
  72. package/lib/cjs/decorators/operations/deprecated.d.ts +0 -23
  73. package/lib/cjs/decorators/operations/header.d.ts +0 -49
  74. package/lib/cjs/decorators/operations/in.d.ts +0 -64
  75. package/lib/cjs/decorators/operations/inFile.d.ts +0 -25
  76. package/lib/cjs/decorators/operations/location.d.ts +0 -22
  77. package/lib/cjs/decorators/operations/operationId.d.ts +0 -10
  78. package/lib/cjs/decorators/operations/operationPath.d.ts +0 -21
  79. package/lib/cjs/decorators/operations/partial.d.ts +0 -10
  80. package/lib/cjs/decorators/operations/path.d.ts +0 -15
  81. package/lib/cjs/decorators/operations/produces.d.ts +0 -26
  82. package/lib/cjs/decorators/operations/redirect.d.ts +0 -52
  83. package/lib/cjs/decorators/operations/returns.d.ts +0 -253
  84. package/lib/cjs/decorators/operations/route.d.ts +0 -188
  85. package/lib/cjs/decorators/operations/security.d.ts +0 -23
  86. package/lib/cjs/decorators/operations/status.d.ts +0 -127
  87. package/lib/cjs/decorators/operations/summary.d.ts +0 -20
  88. package/lib/cjs/decorators/operations/tags.d.ts +0 -23
  89. package/lib/cjs/domain/DecoratorContext.d.ts +0 -28
  90. package/lib/cjs/domain/JsonAliasMap.d.ts +0 -12
  91. package/lib/cjs/domain/JsonClassStore.d.ts +0 -12
  92. package/lib/cjs/domain/JsonEntityStore.d.ts +0 -135
  93. package/lib/cjs/domain/JsonFormatTypes.d.ts +0 -17
  94. package/lib/cjs/domain/JsonLazyRef.d.ts +0 -11
  95. package/lib/cjs/domain/JsonMap.d.ts +0 -7
  96. package/lib/cjs/domain/JsonMethodStore.d.ts +0 -40
  97. package/lib/cjs/domain/JsonOperation.d.ts +0 -51
  98. package/lib/cjs/domain/JsonOperationPathsMap.d.ts +0 -7
  99. package/lib/cjs/domain/JsonOperationRoute.d.ts +0 -24
  100. package/lib/cjs/domain/JsonParameter.d.ts +0 -22
  101. package/lib/cjs/domain/JsonParameterStore.d.ts +0 -30
  102. package/lib/cjs/domain/JsonParameterTypes.d.ts +0 -16
  103. package/lib/cjs/domain/JsonPropertyStore.d.ts +0 -23
  104. package/lib/cjs/domain/JsonRequestBody.d.ts +0 -11
  105. package/lib/cjs/domain/JsonResponse.d.ts +0 -22
  106. package/lib/cjs/domain/JsonSchema.d.ts +0 -337
  107. package/lib/cjs/domain/SpecTypes.d.ts +0 -5
  108. package/lib/cjs/domain/index.d.ts +0 -16
  109. package/lib/cjs/hooks/alterIgnore.d.ts +0 -9
  110. package/lib/cjs/hooks/alterOneOf.d.ts +0 -3
  111. package/lib/cjs/hooks/alterRequiredGroups.d.ts +0 -6
  112. package/lib/cjs/index.d.ts +0 -20
  113. package/lib/cjs/interfaces/IgnoreCallback.d.ts +0 -4
  114. package/lib/cjs/interfaces/JsonHookContext.d.ts +0 -17
  115. package/lib/cjs/interfaces/JsonOpenSpec.d.ts +0 -9
  116. package/lib/cjs/interfaces/JsonSchemaOptions.d.ts +0 -26
  117. package/lib/cjs/interfaces/index.d.ts +0 -4
  118. package/lib/cjs/registries/JsonSchemaMapperContainer.d.ts +0 -19
  119. package/lib/cjs/utils/buildPath.d.ts +0 -6
  120. package/lib/cjs/utils/concatParameters.d.ts +0 -4
  121. package/lib/cjs/utils/concatPath.d.ts +0 -1
  122. package/lib/cjs/utils/defineStatusModel.d.ts +0 -3
  123. package/lib/cjs/utils/from.d.ts +0 -189
  124. package/lib/cjs/utils/generics.d.ts +0 -50
  125. package/lib/cjs/utils/getComputedType.d.ts +0 -5
  126. package/lib/cjs/utils/getInheritedStores.d.ts +0 -8
  127. package/lib/cjs/utils/getJsonEntityStore.d.ts +0 -15
  128. package/lib/cjs/utils/getJsonPathParameters.d.ts +0 -7
  129. package/lib/cjs/utils/getJsonSchema.d.ts +0 -4
  130. package/lib/cjs/utils/getJsonType.d.ts +0 -5
  131. package/lib/cjs/utils/getOperationsRoutes.d.ts +0 -8
  132. package/lib/cjs/utils/getOperationsStores.d.ts +0 -6
  133. package/lib/cjs/utils/getPropertiesStores.d.ts +0 -20
  134. package/lib/cjs/utils/getRequiredProperties.d.ts +0 -6
  135. package/lib/cjs/utils/getSpec.d.ts +0 -49
  136. package/lib/cjs/utils/isJsonClass.d.ts +0 -4
  137. package/lib/cjs/utils/isSuccessStatus.d.ts +0 -2
  138. package/lib/cjs/utils/mapHeaders.d.ts +0 -9
  139. package/lib/cjs/utils/mapNullableType.d.ts +0 -3
  140. package/lib/cjs/utils/mapRouteOptions.d.ts +0 -5
  141. package/lib/cjs/utils/matchGroups.d.ts +0 -4
  142. package/lib/cjs/utils/mergeOperation.d.ts +0 -17
  143. package/lib/cjs/utils/mergeSpec.d.ts +0 -23
  144. package/lib/cjs/utils/operationIdFormatter.d.ts +0 -4
  145. package/lib/cjs/utils/ref.d.ts +0 -14
  146. package/lib/cjs/utils/toJsonMapCollection.d.ts +0 -7
  147. package/lib/cjs/utils/toJsonRegex.d.ts +0 -5
@@ -1,13 +0,0 @@
1
- import { AnyJsonSchema } from "../../domain/JsonSchema";
2
- /**
3
- * See https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.26
4
- *
5
- * @decorator
6
- * @validation
7
- * @swagger
8
- * @schema
9
- * @classDecorator
10
- * @input
11
- * @param allOf
12
- */
13
- export declare function AllOf(...allOf: AnyJsonSchema[]): (...args: any[]) => any;
@@ -1,28 +0,0 @@
1
- /**
2
- * Add allowed values when the property or parameters is required.
3
- *
4
- * #### Example on parameter:
5
- *
6
- * ```typescript
7
- * @Post("/")
8
- * async method(@Allow("") @BodyParams("field") field: string) {}
9
- * ```
10
- * > Required will throw a BadRequest when the given value is `null` or `undefined` but not for an empty string.
11
- *
12
- * #### Example on model:
13
- *
14
- * ```typescript
15
- * class Model {
16
- * @Allow("")
17
- * field: string;
18
- * }
19
- * ```
20
- *
21
- * @returns {Function}
22
- * @decorator
23
- * @validation
24
- * @swagger
25
- * @schema
26
- * @input
27
- */
28
- export declare function Allow(...values: any[]): any;
@@ -1,38 +0,0 @@
1
- import { Type } from "@tsed/core";
2
- import type { JSONSchema6TypeName } from "json-schema";
3
- /**
4
- * Set the type of the array items.
5
- *
6
- * ## Example
7
- *
8
- * ```typescript
9
- * class Model {
10
- * @Any()
11
- * property: any;
12
- *
13
- * @Any(String, Number, Boolean)
14
- * property: string | number | boolean;
15
- * }
16
- * ```
17
- *
18
- * Will produce:
19
- *
20
- * ```json
21
- * {
22
- * "type": "object",
23
- * "properties": {
24
- * "property": {
25
- * "type": ["integer", "number", "string", "boolean", "array", "object", "null"]
26
- * }
27
- * }
28
- * }
29
- * ```
30
- *
31
- * @returns {Function}
32
- * @decorator
33
- * @validation
34
- * @swagger
35
- * @schema
36
- * @input
37
- */
38
- export declare function Any(...types: (JSONSchema6TypeName | Type<any> | any)[]): (...args: any[]) => any;
@@ -1,17 +0,0 @@
1
- import { AnyJsonSchema } from "../../domain/JsonSchema";
2
- /**
3
- * See https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.27
4
- *
5
- * ::: warning
6
- * AnyOf isn't supported by OS2
7
- * :::
8
- *
9
- * @decorator
10
- * @validation
11
- * @swagger
12
- * @schema
13
- * @classDecorator
14
- * @input
15
- * @param anyOf
16
- */
17
- export declare function AnyOf(...anyOf: AnyJsonSchema[]): (...args: any[]) => any;
@@ -1,61 +0,0 @@
1
- import type { JSONSchema6Type } from "json-schema";
2
- /**
3
- * The const keyword is used to restrict a value to a fixed value.
4
- *
5
- * ::: warning
6
- * For v6 user, use @@Const@@ from @tsed/schema instead of @tsed/common.
7
- * :::
8
- *
9
- * ## Example
10
- * ### With a string
11
- *
12
- * ```typescript
13
- * class Model {
14
- * @Const("value1")
15
- * property: "value1";
16
- * }
17
- * ```
18
- *
19
- * Will produce:
20
- *
21
- * ```json
22
- * {
23
- * "type": "object",
24
- * "properties": {
25
- * "property": {
26
- * "type": "string",
27
- * "const": "value1"
28
- * }
29
- * }
30
- * }
31
- * ```
32
- * * ### With a boolean
33
- *
34
- * ```typescript
35
- * class Model {
36
- * @Const(true)
37
- * property: boolean;
38
- * }
39
- * ```
40
- *
41
- * Will produce:
42
- *
43
- * ```json
44
- * {
45
- * "type": "object",
46
- * "properties": {
47
- * "property": {
48
- * "type": "boolean",
49
- * "const": true
50
- * }
51
- * }
52
- * }
53
- * ```
54
- *
55
- * @param {string | number | boolean } constValue
56
- * @decorator
57
- * @validation
58
- * @swagger
59
- * @schema
60
- */
61
- export declare function Const(constValue: JSONSchema6Type | any): (...args: any[]) => any;
@@ -1,26 +0,0 @@
1
- /**
2
- * Set a custom key on JsonSchema that is not a part of the official spec.
3
- *
4
- * This custom key can only be displayed if the @@getJsonSchema@@ is called with `{customKeys: true}`.
5
- *
6
- * @returns {Function}
7
- * @decorator
8
- * @validation
9
- * @property
10
- * @parameter
11
- * @schema
12
- */
13
- export declare function CustomKey(key: string, value: any): (...args: any[]) => any;
14
- /**
15
- * Set a group of custom keys on JsonSchema that is not a part of the official spec.
16
- *
17
- * This custom key can only be displayed if the @@getJsonSchema@@ is called with `{customKeys: true}`.
18
- *
19
- * @returns {Function}
20
- * @decorator
21
- * @validation
22
- * @property
23
- * @parameter
24
- * @schema
25
- */
26
- export declare function CustomKeys(obj: Record<string, any>): (...args: any[]) => any;
@@ -1,41 +0,0 @@
1
- /**
2
- * There are no restrictions placed on the value of this keyword.
3
- *
4
- * ::: warning
5
- * For v6 user, use @@Default@@ from @tsed/schema instead of @tsed/common.
6
- * :::
7
- *
8
- * This keyword can be used to supply a default JSON value associated with a particular schema.
9
- * It is RECOMMENDED that a default value be valid against the associated schema.
10
- *
11
- * ## Example
12
- *
13
- * ```typescript
14
- * class Model {
15
- * @Default("10")
16
- * property: string = "10";
17
- * }
18
- * ```
19
- *
20
- * Will produce:
21
- *
22
- * ```json
23
- * {
24
- * "type": "object",
25
- * "properties": {
26
- * "property": {
27
- * "type": "string",
28
- * "default": "10"
29
- * }
30
- * }
31
- * }
32
- * ```
33
- *
34
- * @param {string | number | boolean | {}} defaultValue
35
- * @decorator
36
- * @validation
37
- * @swagger
38
- * @schema
39
- * @input
40
- */
41
- export declare function Default(defaultValue: string | number | boolean | {}): (...args: any[]) => any;
@@ -1,53 +0,0 @@
1
- /**
2
- * Add a description to the class, method or property
3
- *
4
- * ## Examples
5
- * ### On class
6
- *
7
- * ```typescript
8
- * @Description("description")
9
- * class Model {
10
- *
11
- * }
12
- * ```
13
- *
14
- * ### On method
15
- *
16
- * ```typescript
17
- * @Controller("/")
18
- * class ModelCtrl {
19
- * @Description("description")
20
- * async method() {}
21
- * }
22
- * ```
23
- *
24
- * ### On parameter
25
- *
26
- * ```typescript
27
- * @Controller("/")
28
- * class ModelCtrl {
29
- * async method(@Description("description") @PathParam("id") id: string) {}
30
- * }
31
- * ```
32
- *
33
- * ### On property
34
- *
35
- * ```typescript
36
- * class Model {
37
- * @Description("description")
38
- * id: string;
39
- * }
40
- * ```
41
- *
42
- * @param {string} description
43
- * @decorator
44
- * @validation
45
- * @swagger
46
- * @schema
47
- * @input
48
- * @classDecorator
49
- * @methodDecorator
50
- * @propertyDecorator
51
- * @parameterDecorator
52
- */
53
- export declare function Description(description: any): (...args: any[]) => any;
@@ -1,98 +0,0 @@
1
- import type { JSONSchema6Type } from "json-schema";
2
- /**
3
- * The enum keyword is used to restrict a value to a fixed set of values.
4
- * It must be an array with at least one element, where each element is unique.
5
- *
6
- * Elements in the array might be of any value, including null.
7
- *
8
- * ::: warning
9
- * For v6 user, use @@Enum@@ from @tsed/schema instead of @tsed/common.
10
- * :::
11
- *
12
- * ## Example
13
- * ### With primitive type
14
- *
15
- * ```typescript
16
- * class Model {
17
- * @Enum("value1", "value2")
18
- * property: "value1" | "value2";
19
- * }
20
- * ```
21
- *
22
- * Will produce:
23
- *
24
- * ```json
25
- * {
26
- * "type": "object",
27
- * "properties": {
28
- * "property": {
29
- * "type": "string",
30
- * "enum": ["value1", "value2"]
31
- * }
32
- * }
33
- * }
34
- * ```
35
- *
36
- * ### With array type
37
- *
38
- * ```typescript
39
- * class Model {
40
- * @Enum("value1", "value2")
41
- * property: ("value1" | "value2")[];
42
- * }
43
- * ```
44
- *
45
- * Will produce:
46
- *
47
- * ```json
48
- * {
49
- * "type": "object",
50
- * "properties": {
51
- * "property": {
52
- * "type": "array",
53
- * "items": {
54
- * "type": "string",
55
- * "enum": ["value1", "value2"]
56
- * }
57
- * }
58
- * }
59
- * }
60
- * ```
61
- *
62
- * ### With Typescript Enum
63
- *
64
- * ```typescript
65
- * enum SomeEnum {
66
- * ENUM_1 = "enum1",
67
- * ENUM_2 = "enum2"
68
- * }
69
- *
70
- * class Model {
71
- * @Enum(SomeEnum)
72
- * property: SomeEnum;
73
- * }
74
- * ```
75
- *
76
- * Will produce:
77
- *
78
- * ```json
79
- * {
80
- * "type": "object",
81
- * "properties": {
82
- * "property": {
83
- * "type": "string",
84
- * "enum": ["enum1", "enum2"]
85
- * }
86
- * }
87
- * }
88
- * ```
89
- *
90
- * @param {string | number | boolean | {}} enumValue
91
- * @param enumValues
92
- * @decorator
93
- * @validation
94
- * @swagger
95
- * @schema
96
- * @input
97
- */
98
- export declare function Enum(...enumValues: (JSONSchema6Type | any)[]): Function;
@@ -1,11 +0,0 @@
1
- /**
2
- * Add a example metadata on the decorated element.
3
- *
4
- * @decorator
5
- * @swagger
6
- * @schema
7
- * @input
8
- * @methodDecorator
9
- * @classDecorator
10
- */
11
- export declare function Example(...examples: any[]): Function;
@@ -1,12 +0,0 @@
1
- import { OpenSpecHash, OpenSpecRef, OS3Example } from "@tsed/openspec";
2
- /**
3
- * Add a examples metadata on the decorated element.
4
- *
5
- * @decorator
6
- * @swagger
7
- * @schema
8
- * @input
9
- * @methodDecorator
10
- * @classDecorator
11
- */
12
- export declare function Examples(examples: OpenSpecHash<OS3Example | OpenSpecRef>): ParameterDecorator;
@@ -1,69 +0,0 @@
1
- /**
2
- * The value of `exclusiveMaximum` MUST be number, representing an exclusive upper limit for a numeric instance.
3
- *
4
- * If the instance is a number, then the instance is valid only if it has a value strictly less than (not equal to) `exclusiveMaximum`.
5
- *
6
- * ::: warning
7
- * For v6 user, use @@ExclusiveMaximum@@ from @tsed/schema instead of @tsed/common.
8
- * :::
9
- *
10
- * ## Example
11
- * ### With primitive type
12
- *
13
- * ```typescript
14
- * class Model {
15
- * @ExclusiveMaximum(10)
16
- * property: number;
17
- * }
18
- * ```
19
- *
20
- * Will produce:
21
- *
22
- * ```json
23
- * {
24
- * "type": "object",
25
- * "properties": {
26
- * "property": {
27
- * "type": "number",
28
- * "exclusiveMaximum": 10
29
- * }
30
- * }
31
- * }
32
- * ```
33
- *
34
- * ### With array type
35
- *
36
- * ```typescript
37
- * class Model {
38
- * @ExclusiveMaximum(10)
39
- * @CollectionOf(Number)
40
- * property: number[];
41
- * }
42
- * ```
43
- *
44
- * Will produce:
45
- *
46
- * ```json
47
- * {
48
- * "type": "object",
49
- * "properties": {
50
- * "property": {
51
- * "type": "array",
52
- * "items": {
53
- * "type": "number",
54
- * "exclusiveMaximum": 10
55
- * }
56
- * }
57
- * }
58
- * }
59
- * ```
60
- *
61
- * @param maximum
62
- * @param {boolean} exclusiveMaximum
63
- * @decorator
64
- * @validation
65
- * @swagger
66
- * @schema
67
- * @input
68
- */
69
- export declare function ExclusiveMaximum(maximum: number, exclusiveMaximum?: boolean): (...args: any[]) => any;
@@ -1,69 +0,0 @@
1
- /**
2
- * The value of `exclusiveMinimum` MUST be number, representing an exclusive upper limit for a numeric instance.
3
- *
4
- * If the instance is a number, then the instance is valid only if it has a value strictly greater than (not equal to) `exclusiveMinimum`.
5
- *
6
- * ::: warning
7
- * For v6 user, use @@ExclusiveMinimum@@ from @tsed/schema instead of @tsed/common.
8
- * :::
9
- *
10
- * ## Example
11
- * ### With primitive type
12
- *
13
- * ```typescript
14
- * class Model {
15
- * @ExclusiveMinimum(10)
16
- * property: number;
17
- * }
18
- * ```
19
- *
20
- * Will produce:
21
- *
22
- * ```json
23
- * {
24
- * "type": "object",
25
- * "properties": {
26
- * "property": {
27
- * "type": "number",
28
- * "exclusiveMinimum": 10
29
- * }
30
- * }
31
- * }
32
- * ```
33
- *
34
- * ### With array type
35
- *
36
- * ```typescript
37
- * class Model {
38
- * @ExclusiveMinimum(10)
39
- * @CollectionOf(Number)
40
- * property: number[];
41
- * }
42
- * ```
43
- *
44
- * Will produce:
45
- *
46
- * ```json
47
- * {
48
- * "type": "object",
49
- * "properties": {
50
- * "property": {
51
- * "type": "array",
52
- * "items": {
53
- * "type": "number",
54
- * "exclusiveMinimum": 10
55
- * }
56
- * }
57
- * }
58
- * }
59
- * ```
60
- *
61
- * @param minimum
62
- * @param {boolean} exclusiveMinimum
63
- * @decorator
64
- * @validation
65
- * @swagger
66
- * @schema
67
- * @input
68
- */
69
- export declare function ExclusiveMinimum(minimum: number, exclusiveMinimum?: boolean): (...args: any[]) => any;