@tsed/schema 6.95.9 → 6.95.10

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,76 +0,0 @@
1
- /**
2
- * A string instance is valid against this keyword if its length is greater than, or equal to, the value of this keyword.
3
- *
4
- * The length of a string instance is defined as the number of its characters as defined by [RFC 7159](http://json-schema.org/latest/json-schema-validation.html#RFC7159).
5
- *
6
- * ::: warning
7
- * The value of maxLength MUST be a non-negative integer.
8
- * :::
9
- *
10
- * ::: tip
11
- * Omitting this keyword has the same behavior as a value of 0.
12
- * :::
13
- *
14
- * ::: warning
15
- * For v6 user, use @@MaxLength@@ from @tsed/schema instead of @tsed/common.
16
- * :::
17
- *
18
- * ## Example
19
- * ### With primitive type
20
- *
21
- * ```typescript
22
- * class Model {
23
- * @MaxLength(10)
24
- * property: number;
25
- * }
26
- * ```
27
- *
28
- * Will produce:
29
- *
30
- * ```json
31
- * {
32
- * "type": "object",
33
- * "properties": {
34
- * "property": {
35
- * "type": "string",
36
- * "maxLength": 10
37
- * }
38
- * }
39
- * }
40
- * ```
41
- *
42
- * ### With array type
43
- *
44
- * ```typescript
45
- * class Model {
46
- * @MaxLength(10)
47
- * @CollectionOf(String)
48
- * property: string[];
49
- * }
50
- * ```
51
- *
52
- * Will produce:
53
- *
54
- * ```json
55
- * {
56
- * "type": "object",
57
- * "properties": {
58
- * "property": {
59
- * "type": "array",
60
- * "items": {
61
- * "type": "string",
62
- * "maxLength": 10
63
- * }
64
- * }
65
- * }
66
- * }
67
- * ```
68
- *
69
- * @param {number} maxLength The maximum length allowed
70
- * @decorator
71
- * @validation
72
- * @swagger
73
- * @schema
74
- * @input
75
- */
76
- export declare function MaxLength(maxLength: number): (...args: any[]) => any;
@@ -1,138 +0,0 @@
1
- /**
2
- * The value of `maximum` MUST be a number, representing an inclusive upper limit for a numeric instance.
3
- *
4
- * If the instance is a number, then this keyword validates only if the instance is less than or exactly equal to `maximum`.
5
- *
6
- * ::: warning
7
- * For v6 user, use @@Maximum@@ from @tsed/schema instead of @tsed/common.
8
- * :::
9
- *
10
- * ## Example
11
- * ### With primitive type
12
- *
13
- * ```typescript
14
- * class Model {
15
- * @Maximum(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
- * "maximum": 10
29
- * }
30
- * }
31
- * }
32
- * ```
33
- *
34
- * ### With array type
35
- *
36
- * ```typescript
37
- * class Model {
38
- * @Maximum(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
- * "maximum": 10
55
- * }
56
- * }
57
- * }
58
- * }
59
- * ```
60
- *
61
- * @param {number} maximum The maximum value allowed
62
- * @param {boolean} exclusive Same effect as ExclusiveMaximum decorator.
63
- * @decorator
64
- * @validation
65
- * @swagger
66
- * @schema
67
- * @input
68
- */
69
- export declare function Maximum(maximum: number, exclusive?: boolean): (...args: any[]) => any;
70
- /**
71
- * The value of `maximum` MUST be a number, representing an inclusive upper limit for a numeric instance.
72
- *
73
- * If the instance is a number, then this keyword validates only if the instance is less than or exactly equal to `maximum`.
74
- *
75
- * ::: warning
76
- * For v6 user, use @@Maximum@@ from @tsed/schema instead of @tsed/common.
77
- * :::
78
- *
79
- * ## Example
80
- * ### With primitive type
81
- *
82
- * ```typescript
83
- * class Model {
84
- * @Max(10)
85
- * property: number;
86
- * }
87
- * ```
88
- *
89
- * Will produce:
90
- *
91
- * ```json
92
- * {
93
- * "type": "object",
94
- * "properties": {
95
- * "property": {
96
- * "type": "number",
97
- * "maximum": 10
98
- * }
99
- * }
100
- * }
101
- * ```
102
- *
103
- * ### With array type
104
- *
105
- * ```typescript
106
- * class Model {
107
- * @Max(10)
108
- * @CollectionOf(Number)
109
- * property: number[];
110
- * }
111
- * ```
112
- *
113
- * Will produce:
114
- *
115
- * ```json
116
- * {
117
- * "type": "object",
118
- * "properties": {
119
- * "property": {
120
- * "type": "array",
121
- * "items": {
122
- * "type": "number",
123
- * "maximum": 10
124
- * }
125
- * }
126
- * }
127
- * }
128
- * ```
129
- *
130
- * @param {number} maximum The maximum value allowed
131
- * @param {boolean} exclusive Same effect as ExclusiveMaximum decorator.
132
- * @decorator
133
- * @validation
134
- * @swagger
135
- * @schema
136
- * @input
137
- */
138
- export declare function Max(maximum: number, exclusive?: boolean): (...args: any[]) => any;
@@ -1,77 +0,0 @@
1
- /**
2
- *
3
- * A string instance is valid against this keyword if its length is greater than, or equal to, the value of this keyword.
4
- *
5
- * The length of a string instance is defined as the number of its characters as defined by [RFC 7159](http://json-schema.org/latest/json-schema-validation.html#RFC7159).
6
- *
7
- * ::: warning
8
- * The value of minLength MUST be a non-negative integer.
9
- * :::
10
- *
11
- * ::: tip
12
- * Omitting this keyword has the same behavior as a value of 0.
13
- * :::
14
- *
15
- * ::: warning
16
- * For v6 user, use @@MinLength@@ from @tsed/schema instead of @tsed/common.
17
- * :::
18
- *
19
- * ## Example
20
- * ### With primitive type
21
- *
22
- * ```typescript
23
- * class Model {
24
- * @MinLength(10)
25
- * property: number;
26
- * }
27
- * ```
28
- *
29
- * Will produce:
30
- *
31
- * ```json
32
- * {
33
- * "type": "object",
34
- * "properties": {
35
- * "property": {
36
- * "type": "string",
37
- * "maxLength": 10
38
- * }
39
- * }
40
- * }
41
- * ```
42
- *
43
- * ### With array type
44
- *
45
- * ```typescript
46
- * class Model {
47
- * @MinLength(10)
48
- * @CollectionOf(String)
49
- * property: string[];
50
- * }
51
- * ```
52
- *
53
- * Will produce:
54
- *
55
- * ```json
56
- * {
57
- * "type": "object",
58
- * "properties": {
59
- * "property": {
60
- * "type": "array",
61
- * "items": {
62
- * "type": "string",
63
- * "minLength": 10
64
- * }
65
- * }
66
- * }
67
- * }
68
- * ```
69
- *
70
- * @param {number} minLength
71
- * @decorator
72
- * @validation
73
- * @swagger
74
- * @schema
75
- * @input
76
- */
77
- export declare function MinLength(minLength: number): (...args: any[]) => any;
@@ -1,136 +0,0 @@
1
- /**
2
- * The value of `minimum` MUST be a number, representing an inclusive upper limit for a numeric instance.
3
- *
4
- * If the instance is a number, then this keyword validates only if the instance is greater than or exactly equal to `minimum`.
5
- *
6
- * ::: warning
7
- * This decorator will be removed in v7.
8
- * For v6 user, use @@Minimum@@ from @tsed/schema instead of @tsed/common.
9
- * :::
10
- *
11
- * ## Example
12
- * ### With primitive type
13
- *
14
- * ```typescript
15
- * class Model {
16
- * @Minimum(10)
17
- * property: number;
18
- * }
19
- * ```
20
- *
21
- * Will produce:
22
- *
23
- * ```json
24
- * {
25
- * "type": "object",
26
- * "properties": {
27
- * "property": {
28
- * "type": "number",
29
- * "minimum": 10
30
- * }
31
- * }
32
- * }
33
- * ```
34
- *
35
- * ### With array type
36
- *
37
- * ```typescript
38
- * class Model {
39
- * @Minimum(10)
40
- * @CollectionOf(Number)
41
- * property: number[];
42
- * }
43
- * ```
44
- *
45
- * Will produce:
46
- *
47
- * ```json
48
- * {
49
- * "type": "object",
50
- * "properties": {
51
- * "property": {
52
- * "type": "array",
53
- * "items": {
54
- * "type": "number",
55
- * "minimum": 10
56
- * }
57
- * }
58
- * }
59
- * }
60
- * ```
61
- *
62
- * @param {number} minimum The minimum value allowed
63
- * @param {boolean} exclusive
64
- * @decorator
65
- * @validation
66
- * @swagger
67
- * @schema
68
- * @input
69
- */
70
- export declare function Minimum(minimum: number, exclusive?: boolean): (...args: any[]) => any;
71
- /**
72
- * The value of `minimum` MUST be a number, representing an inclusive upper limit for a numeric instance.
73
- *
74
- * If the instance is a number, then this keyword validates only if the instance is greater than or exactly equal to `minimum`.
75
- *
76
- * ## Example
77
- * ### With primitive type
78
- *
79
- * ```typescript
80
- * class Model {
81
- * @Min(10)
82
- * property: number;
83
- * }
84
- * ```
85
- *
86
- * Will produce:
87
- *
88
- * ```json
89
- * {
90
- * "type": "object",
91
- * "properties": {
92
- * "property": {
93
- * "type": "number",
94
- * "minimum": 10
95
- * }
96
- * }
97
- * }
98
- * ```
99
- *
100
- * ### With array type
101
- *
102
- * ```typescript
103
- * class Model {
104
- * @Min(10)
105
- * @CollectionOf(Number)
106
- * property: number[];
107
- * }
108
- * ```
109
- *
110
- * Will produce:
111
- *
112
- * ```json
113
- * {
114
- * "type": "object",
115
- * "properties": {
116
- * "property": {
117
- * "type": "array",
118
- * "items": {
119
- * "type": "number",
120
- * "minimum": 10
121
- * }
122
- * }
123
- * }
124
- * }
125
- * ```
126
- *
127
- * @alias Minimum
128
- * @param minimum The minimum value allowed
129
- * @param exclusive
130
- * @decorator
131
- * @validation
132
- * @swagger
133
- * @schema
134
- * @input
135
- */
136
- export declare function Min(minimum: number, exclusive?: boolean): (...args: any[]) => any;
@@ -1,68 +0,0 @@
1
- /**
2
- * A numeric instance is valid only if division by this keyword's value results in an integer.
3
- *
4
- * ::: warning
5
- * The value of `multipleOf` MUST be a number, strictly greater than 0.
6
- * :::
7
- *
8
- * ::: warning
9
- * For v6 user, use @@MultipleOf@@ from @tsed/schema instead of @tsed/common.
10
- * :::
11
- *
12
- * ## Example
13
- * ### With primitive type
14
- *
15
- * ```typescript
16
- * class Model {
17
- * @MultipleOf(2)
18
- * property: Number;
19
- * }
20
- * ```
21
- *
22
- * ```json
23
- * {
24
- * "type": "object",
25
- * "properties": {
26
- * "property": {
27
- * "type": "number",
28
- * "multipleOf": 2
29
- * }
30
- * }
31
- * }
32
- * ```
33
- *
34
- * ### With array type
35
- *
36
- * ```typescript
37
- * class Model {
38
- * @CollectionOf(number)
39
- * @MultipleOf(2)
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
- * "multipleOf": 2
55
- * }
56
- * }
57
- * }
58
- * }
59
- * ```
60
- *
61
- * @param {number} multipleOf The multiple value allowed
62
- * @decorator
63
- * @validation
64
- * @swagger
65
- * @schema
66
- * @input
67
- */
68
- export declare function MultipleOf(multipleOf: number): (...args: any[]) => any;
@@ -1,32 +0,0 @@
1
- /**
2
- * Add a name metadata on the decorated element.
3
- *
4
- * ## Examples
5
- * ### On parameters
6
- *
7
- * ```typescript
8
- * async myMethod(@Name("nameOf") @PathParams("id") id: string): Promise<Model> {
9
- *
10
- * }
11
- * ```
12
- *
13
- * ### On parameters
14
- *
15
- * ```typescript
16
- * @Name("AliasName")
17
- * @Controller("/")
18
- * class ModelCtrl {
19
- *
20
- * }
21
- * ```
22
- *
23
- * @param name
24
- * @decorator
25
- * @validation
26
- * @swagger
27
- * @schema
28
- * @input
29
- * @classDecorator
30
- * @operation
31
- */
32
- export declare function Name(name: any): (...args: any[]) => any;
@@ -1,25 +0,0 @@
1
- import { Type } from "@tsed/core";
2
- import type { JSONSchema6TypeName } from "json-schema";
3
- /**
4
- * Set field as nullable.
5
- *
6
- * ## Example
7
- *
8
- * ```typescript
9
- * class Model {
10
- * @Nullable(Date)
11
- * property: Date | null;
12
- *
13
- * @Nullable(String, Number, Boolean)
14
- * property: string | number | boolean | null;
15
- * }
16
- * ```
17
- *
18
- * @returns {Function}
19
- * @decorator
20
- * @validation
21
- * @swagger
22
- * @schema
23
- * @input
24
- */
25
- export declare function Nullable(type: JSONSchema6TypeName | Type<any> | any, ...types: (JSONSchema6TypeName | Type<any> | 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.28
4
- *
5
- * ::: warning
6
- * OneOf isn't supported by OS2
7
- * :::
8
- *
9
- * @decorator
10
- * @validation
11
- * @swagger
12
- * @schema
13
- * @classDecorator
14
- * @input
15
- * @param oneOf
16
- */
17
- export declare function OneOf(...oneOf: AnyJsonSchema[]): (...args: any[]) => any;
@@ -1,10 +0,0 @@
1
- /**
2
- * Add optional annotation on Property or Parameter.
3
- *
4
- * @decorator
5
- * @validation
6
- * @swagger
7
- * @schema
8
- * @input
9
- */
10
- export declare function Optional(): (...args: any[]) => any;
@@ -1,93 +0,0 @@
1
- /**
2
- * The pattern and Pattern Properties keywords use regular expressions to express constraints.
3
- * The regular expression syntax used is from JavaScript (ECMA 262, specifically). However, that complete syntax is not widely supported, therefore it is recommended that you stick to the subset of that syntax described below.
4
- *
5
- * ::: warning
6
- * For v6 user, use @@Pattern@@ from @tsed/schema instead of @tsed/common.
7
- * :::
8
- *
9
- * A single unicode character (other than the special characters below) matches itself.
10
- *
11
- * * `^`: Matches only at the beginning of the string.
12
- * * `$`: Matches only at the end of the string.
13
- * * `(...)`: Group a series of regular expressions into a single regular expression.
14
- * * `|`: Matches either the regular expression preceding or following the | symbol.
15
- * * `[abc]`: Matches any of the characters inside the square brackets.
16
- * * `[a-z]`: Matches the range of characters.
17
- * * `[^abc]`: Matches any character not listed.
18
- * * `[^a-z]`: Matches any character outside of the range.
19
- * * `+`: Matches one or more repetitions of the preceding regular expression.
20
- * * `*`: Matches zero or more repetitions of the preceding regular expression.
21
- * * `?`: Matches zero or one repetitions of the preceding regular expression.
22
- * * `+?`, *?`, ??`: The `*`, `+`, and `?` qualifiers are all greedy; they match as much text as possible. Sometimes this behavior isn’t desired and you want to match as few characters as possible.
23
- * * `{x}`: Match exactly x occurrences of the preceding regular expression.
24
- * * `{x,y}`: Match at least x and at most y occurrences of the preceding regular expression.
25
- * * `{x,}`: Match x occurrences or more of the preceding regular expression.
26
- * * `{x}?`, {x,y}?, {x,}?`: Lazy versions of the above expressions.
27
- *
28
- * ## Example
29
- *
30
- * ```typescript
31
- * class Model {
32
- * @Pattern("^(\\([0-9]{3}\\))?[0-9]{3}-[0-9]{4}$")
33
- * @Pattern(/^(\\([0-9]{3}\\))?[0-9]{3}-[0-9]{4}$/)
34
- * property: string;
35
- * }
36
- * ```
37
- *
38
- * ### With primitive type
39
- *
40
- * ```typescript
41
- * class Model {
42
- * @Pattern(/^(\\([0-9]{3}\\))?[0-9]{3}-[0-9]{4}$/)
43
- * property: string;
44
- * }
45
- * ```
46
- *
47
- * ```json
48
- * {
49
- * "type": "object",
50
- * "properties": {
51
- * "property": {
52
- * "type": "string",
53
- * "pattern": "^(\\([0-9]{3}\\))?[0-9]{3}-[0-9]{4}$"
54
- * }
55
- * }
56
- * }
57
- * ```
58
- *
59
- * ### With array type
60
- *
61
- * ```typescript
62
- * class Model {
63
- * @CollectionOf(string)
64
- * @Pattern(/^(\\([0-9]{3}\\))?[0-9]{3}-[0-9]{4}$/)
65
- * property: string[];
66
- * }
67
- * ```
68
- *
69
- * Will produce:
70
- *
71
- * ```json
72
- * {
73
- * "type": "object",
74
- * "properties": {
75
- * "property": {
76
- * "type": "array",
77
- * "items": {
78
- * "type": "string",
79
- * "pattern": "^(\\([0-9]{3}\\))?[0-9]{3}-[0-9]{4}$"
80
- * }
81
- * }
82
- * }
83
- * }
84
- * ```
85
- *
86
- * @param {string} pattern
87
- * @decorator
88
- * @validation
89
- * @swagger
90
- * @schema
91
- * @input
92
- */
93
- export declare function Pattern(pattern: string | RegExp): (...args: any[]) => any;
@@ -1,11 +0,0 @@
1
- /**
2
- * Declare a new property on a model.
3
- *
4
- * @param type
5
- * @decorator
6
- * @validation
7
- * @swagger
8
- * @schema
9
- * @input
10
- */
11
- export declare function Property(type?: any): (...args: any[]) => any;
@@ -1,11 +0,0 @@
1
- /**
2
- * Set the property as readOnly.
3
- *
4
- * @returns {Function}
5
- * @decorator
6
- * @validation
7
- * @property
8
- * @parameter
9
- * @schema
10
- */
11
- export declare function ReadOnly(readOnly?: boolean): (...args: any[]) => any;