@tsed/schema 6.95.8 → 6.96.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.
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,189 +0,0 @@
1
- import { Type } from "@tsed/core";
2
- import { JsonSchema } from "../domain/JsonSchema";
3
- /**
4
- * Create a new model from the given type.
5
- *
6
- * ```typescript
7
- * from(String)
8
- * ```
9
- *
10
- * * See @@JsonSchema@@ to discover available methods.
11
- *
12
- * @schemaFunctional
13
- */
14
- export declare function from(type?: Type<any>): JsonSchema;
15
- /**
16
- * Declare a new number model.
17
- *
18
- * * See @@JsonSchema@@ to discover available methods.
19
- *
20
- * @schemaFunctional
21
- */
22
- export declare function number(): JsonSchema;
23
- /**
24
- * Declare a new integer model.
25
- *
26
- * * See @@JsonSchema@@ to discover available methods.
27
- *
28
- * @schemaFunctional
29
- */
30
- export declare function integer(): JsonSchema;
31
- /**
32
- * Declare a new string model.
33
- *
34
- * * See @@JsonSchema@@ to discover available methods.
35
- *
36
- * @schemaFunctional
37
- */
38
- export declare function string(): JsonSchema;
39
- /**
40
- * Declare a new boolean model.
41
- *
42
- * * See @@JsonSchema@@ to discover available methods.
43
- *
44
- * @schemaFunctional
45
- */
46
- export declare function boolean(): JsonSchema;
47
- /**
48
- * Declare a new string model with `format: date`.
49
- *
50
- * * See @@JsonSchema@@ to discover available methods.
51
- *
52
- * @schemaFunctional
53
- */
54
- export declare function date(): JsonSchema;
55
- /**
56
- * Declare a new string model with `format: datetime`.
57
- *
58
- * * See @@JsonSchema@@ to discover available methods.
59
- *
60
- * @schemaFunctional
61
- */
62
- export declare function datetime(): JsonSchema;
63
- /**
64
- * Declare a new string model with `format: time`.
65
- *
66
- * * See @@JsonSchema@@ to discover available methods.
67
- *
68
- * @schemaFunctional
69
- */
70
- export declare function time(): JsonSchema;
71
- /**
72
- * Declare a new string model with `format: email`.
73
- *
74
- * * See @@JsonSchema@@ to discover available methods.
75
- *
76
- * @schemaFunctional
77
- */
78
- export declare function email(): JsonSchema;
79
- /**
80
- * Declare a new string model with `format: uri`.
81
- *
82
- * * See @@JsonSchema@@ to discover available methods.
83
- *
84
- * @schemaFunctional
85
- */
86
- export declare function uri(): JsonSchema;
87
- /**
88
- * Declare a new string model with `format: url`.
89
- *
90
- * * See @@JsonSchema@@ to discover available methods.
91
- *
92
- * @schemaFunctional
93
- */
94
- export declare function url(): JsonSchema;
95
- /**
96
- * Declare a new object model with `additionalProperties: true`.
97
- *
98
- * ```json
99
- * {
100
- * "type": "array"
101
- * }
102
- * ```
103
- *
104
- * * See @@JsonSchema@@ to discover available methods.
105
- *
106
- * @schemaFunctional
107
- */
108
- export declare function array(): JsonSchema;
109
- /**
110
- * Declare a new object model with `additionalProperties: true`.
111
- *
112
- * ```json
113
- * {
114
- * "type": "object",
115
- * "additionalProperties": true
116
- * }
117
- * ```
118
- *
119
- * * See @@JsonSchema@@ to discover available methods.
120
- *
121
- * @schemaFunctional
122
- */
123
- export declare function map(): JsonSchema;
124
- /**
125
- * Declare a new array model with `uniqueItems: true`.
126
- *
127
- * ```json
128
- * {
129
- * "type": "array",
130
- * "uniqueItems": true
131
- * }
132
- * ```
133
- *
134
- * * See @@JsonSchema@@ to discover available methods.
135
- *
136
- * @schemaFunctional
137
- */
138
- export declare function set(): JsonSchema;
139
- /**
140
- * Declare a new object model.
141
- *
142
- * * See @@JsonSchema@@ to discover available methods.
143
- *
144
- * @schemaFunctional
145
- */
146
- export declare function object(properties?: {
147
- [key: string]: JsonSchema;
148
- }): JsonSchema;
149
- /**
150
- * Declare a model with any type (By default: `integer`, `number`, `string`, `boolean`, `array`, `object`, `null`)
151
- *
152
- * * See @@JsonSchema@@ to discover available methods.
153
- *
154
- * @schemaFunctional
155
- */
156
- export declare function any(...types: any[]): JsonSchema;
157
- /**
158
- * See https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.27
159
- *
160
- * * See @@JsonSchema@@ to discover available methods.
161
- *
162
- * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.27
163
- * @schemaFunctional
164
- */
165
- export declare function anyOf(...anyOf: any[]): JsonSchema;
166
- /**
167
- * See https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.28
168
- *
169
- * * See @@JsonSchema@@ to discover available methods.
170
- *
171
- * @schemaFunctional
172
- * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.28
173
- */
174
- export declare function oneOf(...oneOf: any[]): JsonSchema;
175
- /**
176
- * See https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.26
177
- *
178
- * * See @@JsonSchema@@ to discover available methods.
179
- *
180
- * @see https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.26
181
- * @schemaFunctional
182
- */
183
- export declare function allOf(...allOf: any[]): JsonSchema;
184
- /**
185
- * Declare a sub schema which will be resolved later. Use this function when you have a circular reference between two schemes.
186
- *
187
- * @schemaFunctional
188
- */
189
- export declare function lazyRef(cb: () => Type<any>): any;
@@ -1,50 +0,0 @@
1
- import { Type } from "@tsed/core";
2
- import { JsonSchema } from "../domain";
3
- export declare type GenericValue = Type<any> | JsonSchema | any;
4
- /**
5
- * @ignore
6
- */
7
- export declare type GenericsMap = Map<string, GenericValue>;
8
- /**
9
- * @ignore
10
- */
11
- export interface GenericTypes {
12
- genericTypes: Type<any>[];
13
- [key: string]: any;
14
- }
15
- /**
16
- * @ignore
17
- */
18
- export interface GenericLabels {
19
- genericLabels: string[];
20
- [key: string]: any;
21
- }
22
- /**
23
- * @ignore
24
- */
25
- export interface NestedGenerics {
26
- nestedGenerics: GenericValue[][];
27
- [key: string]: any;
28
- }
29
- /**
30
- * @ignore
31
- */
32
- export interface GenericsContext extends GenericTypes, GenericLabels, NestedGenerics {
33
- generics: GenericsMap;
34
- }
35
- /**
36
- * @ignore
37
- * @param genericLabels
38
- * @param genericTypes
39
- */
40
- export declare function getGenericsMap(genericLabels: string[], genericTypes: GenericValue[]): GenericsMap;
41
- /**
42
- * @ignore
43
- * @param options
44
- */
45
- export declare function mapGenericsOptions(options: Partial<GenericTypes & GenericLabels>): Partial<GenericTypes & GenericLabels>;
46
- /**
47
- * @ignore
48
- * @param value
49
- */
50
- export declare function popGenerics(value: NestedGenerics): NestedGenerics & GenericTypes;
@@ -1,5 +0,0 @@
1
- import { Type } from "@tsed/core";
2
- /**
3
- * @ignore
4
- */
5
- export declare function getComputedType(target: any): Type<any>;
@@ -1,8 +0,0 @@
1
- import { Type } from "@tsed/core";
2
- import type { JsonClassStore } from "../domain/JsonClassStore";
3
- /**
4
- * Return store and his inherited stores
5
- * @param target
6
- * @ignore
7
- */
8
- export declare function getInheritedStores(target: Type<any> | any): Map<Type<any>, JsonClassStore>;
@@ -1,15 +0,0 @@
1
- import { Type } from "@tsed/core";
2
- import { JsonEntityStore } from "../domain/JsonEntityStore";
3
- import { JsonClassStore } from "../domain/JsonClassStore";
4
- import { JsonPropertyStore } from "../domain/JsonPropertyStore";
5
- import { JsonParameterStore } from "../domain/JsonParameterStore";
6
- import { JsonMethodStore } from "../domain/JsonMethodStore";
7
- /**
8
- * Get entity store from decorator args
9
- * @param target
10
- */
11
- export declare function getJsonEntityStore<T extends JsonClassStore = JsonClassStore>(target: Type<any>): T;
12
- export declare function getJsonEntityStore<T extends JsonPropertyStore = JsonPropertyStore>(target: Type<any> | any, propertyKey: string | symbol): T;
13
- export declare function getJsonEntityStore<T extends JsonParameterStore = JsonParameterStore>(target: Type<any> | any, propertyKey: string | symbol, index: number): T;
14
- export declare function getJsonEntityStore<T extends JsonMethodStore = JsonMethodStore>(target: Type<any> | any, propertyKey: string | symbol, descriptor: PropertyDescriptor): T;
15
- export declare function getJsonEntityStore<T extends JsonEntityStore = JsonEntityStore>(...args: any[]): T;
@@ -1,7 +0,0 @@
1
- /**
2
- * @ignore
3
- */
4
- export declare function getJsonPathParameters(base: string, path?: string | RegExp | (string | RegExp)[]): {
5
- path: string;
6
- parameters: any[];
7
- }[];
@@ -1,4 +0,0 @@
1
- import { Type } from "@tsed/core";
2
- import "../components";
3
- import { JsonSchemaOptions } from "../interfaces";
4
- export declare function getJsonSchema(model: Type<any> | any, options?: JsonSchemaOptions): any;
@@ -1,5 +0,0 @@
1
- /**
2
- * @ignore
3
- */
4
- export declare const JSON_TYPES: string[];
5
- export declare function getJsonType(value: any): string;
@@ -1,8 +0,0 @@
1
- import { Type } from "@tsed/core";
2
- import { JsonOperationRoute } from "../domain/JsonOperationRoute";
3
- import { JsonEntityStore } from "../domain/JsonEntityStore";
4
- export interface GetOperationsRoutesOptions {
5
- withChildren?: boolean;
6
- basePath?: string;
7
- }
8
- export declare function getOperationsRoutes<Entity extends JsonEntityStore = JsonEntityStore>(token: Type<any> | any, options?: GetOperationsRoutesOptions): JsonOperationRoute<Entity>[];
@@ -1,6 +0,0 @@
1
- import { Type } from "@tsed/core";
2
- import { JsonMethodStore } from "../domain/JsonMethodStore";
3
- /**
4
- * @ignore
5
- */
6
- export declare function getOperationsStores<T extends JsonMethodStore = JsonMethodStore>(target: Type<any> | any): Map<string, T>;
@@ -1,20 +0,0 @@
1
- import { Type } from "@tsed/core";
2
- import type { JsonPropertyStore } from "../domain/JsonPropertyStore";
3
- /**
4
- * Return the list of properties including properties from inherited classes
5
- * @param target
6
- * @ignore
7
- */
8
- export declare function getPropertiesStores<T extends JsonPropertyStore = JsonPropertyStore>(target: Type<any> | any): Map<string | symbol | number, T>;
9
- /**
10
- * @ignore
11
- */
12
- export interface GetPropertiesOptions {
13
- withIgnoredProps?: boolean;
14
- groups?: string[] | false;
15
- [type: string]: any;
16
- }
17
- /**
18
- * @ignore
19
- */
20
- export declare function getProperties<T extends JsonPropertyStore = JsonPropertyStore>(target: Type<any> | any, options?: GetPropertiesOptions): Map<string | number | symbol, T>;
@@ -1,6 +0,0 @@
1
- import type { JsonSchema } from "../domain/JsonSchema";
2
- import type { JsonSchemaOptions } from "../interfaces/JsonSchemaOptions";
3
- /**
4
- * @ignore
5
- */
6
- export declare function getRequiredProperties(obj: any, schema: JsonSchema, options: JsonSchemaOptions): any;
@@ -1,49 +0,0 @@
1
- import { Type } from "@tsed/core";
2
- import { OpenSpec2, OpenSpec3 } from "@tsed/openspec";
3
- import { SpecTypes } from "../domain/SpecTypes";
4
- import { JsonSchemaOptions } from "../interfaces";
5
- export interface SpecSerializerOptions extends JsonSchemaOptions {
6
- specType?: SpecTypes.SWAGGER | SpecTypes.OPENAPI;
7
- /**
8
- * Paths
9
- */
10
- paths?: any;
11
- /**
12
- * Root path. This paths will be added to all generated paths Object.
13
- */
14
- rootPath?: string;
15
- /**
16
- * A function to generate the operationId.
17
- */
18
- operationIdFormatter?: (name: string, propertyKey: string, path: string) => string;
19
- /**
20
- * A pattern to generate the operationId.
21
- */
22
- operationIdPattern?: string;
23
- }
24
- export interface OS3SpecSerializerOptions extends SpecSerializerOptions {
25
- /**
26
- * Define Spec types level
27
- */
28
- specType: SpecTypes.OPENAPI;
29
- }
30
- export interface OS2SpecSerializerOptions extends SpecSerializerOptions {
31
- /**
32
- * Define Spec types level
33
- */
34
- specType: SpecTypes.SWAGGER;
35
- }
36
- /**
37
- * Return the swagger or open spec for the given class.
38
- * @param model
39
- * @param options
40
- */
41
- export declare function getSpec(model: Type<any>, options: OS2SpecSerializerOptions): Partial<OpenSpec2>;
42
- export declare function getSpec(model: Type<any>): Partial<OpenSpec2>;
43
- export declare function getSpec(model: Type<any>, options: SpecSerializerOptions): Partial<OpenSpec2>;
44
- /**
45
- * Return the swagger or open spec for the given class.
46
- * @param model
47
- * @param options
48
- */
49
- export declare function getSpec(model: Type<any>, options: OS3SpecSerializerOptions): Partial<OpenSpec3>;
@@ -1,4 +0,0 @@
1
- /**
2
- * @ignore
3
- */
4
- export declare function isJsonClass(type: any): boolean;
@@ -1,2 +0,0 @@
1
- export declare const isSuccessStatus: (code: string | number | undefined) => boolean | 0;
2
- export declare const isRedirectionStatus: (code: string | number | undefined) => boolean | 0;
@@ -1,9 +0,0 @@
1
- import { JsonHeader, JsonHeaders } from "../interfaces/JsonOpenSpec";
2
- /**
3
- * Map input header to a standard open spec header
4
- * @param headers
5
- * @ignore
6
- */
7
- export declare function mapHeaders(headers: JsonHeaders): {
8
- [key: string]: JsonHeader;
9
- };
@@ -1,3 +0,0 @@
1
- import type { JsonSchema } from "../domain/JsonSchema";
2
- import type { JsonSchemaOptions } from "../interfaces/JsonSchemaOptions";
3
- export declare function mapNullableType(obj: any, schema: JsonSchema, options: JsonSchemaOptions): any;
@@ -1,5 +0,0 @@
1
- export declare function mapRouteOptions(args: any[]): {
2
- path: undefined;
3
- method: undefined;
4
- use: any[];
5
- };
@@ -1,4 +0,0 @@
1
- /**
2
- * @ignore
3
- */
4
- export declare function matchGroups(groups: string[], compareWith?: string[]): boolean;
@@ -1,17 +0,0 @@
1
- import { SpecTypes } from "../domain/SpecTypes";
2
- /**
3
- * @ignore
4
- */
5
- export interface MergeOperationOptions {
6
- rootPath: string;
7
- specType: SpecTypes;
8
- operationId: (path: string) => string | undefined;
9
- defaultTags: string[];
10
- tags: string[];
11
- path: string;
12
- method: string;
13
- }
14
- /**
15
- * @ignore
16
- */
17
- export declare function mergeOperation(obj: any, operation: any, { rootPath, specType, operationId, defaultTags, tags, path, method }: MergeOperationOptions): any;
@@ -1,23 +0,0 @@
1
- import { OpenSpec2, OpenSpec3 } from "@tsed/openspec";
2
- /**
3
- * @ignore
4
- */
5
- export declare const schemesReducer: (collection: any[], value: any, options: import("@tsed/core").DeepMergeOptions) => any[];
6
- /**
7
- * @ignore
8
- */
9
- export declare const parameters: (collection: any[], value: any, options: import("@tsed/core").DeepMergeOptions) => any[];
10
- /**
11
- * @ignore
12
- */
13
- export declare const security: (collection: any[], value: any, options: import("@tsed/core").DeepMergeOptions) => any[];
14
- /**
15
- * @ignore
16
- */
17
- export declare const tagsReducer: (collection: any[], value: any, options: import("@tsed/core").DeepMergeOptions) => any[];
18
- /**
19
- * Merge two spec
20
- * @param spec
21
- * @param input
22
- */
23
- export declare function mergeSpec<Spec = OpenSpec2 | OpenSpec3>(spec: Partial<Spec>, input: Partial<Spec>): Partial<Spec>;
@@ -1,4 +0,0 @@
1
- /**
2
- * @ignore
3
- */
4
- export declare function operationIdFormatter(pattern?: string): (name: string, propertyKey: string, path?: string) => string;
@@ -1,14 +0,0 @@
1
- import type { JsonSchema } from "../domain/JsonSchema";
2
- import { JsonSchemaOptions } from "../interfaces/JsonSchemaOptions";
3
- /**
4
- * @ignore
5
- */
6
- export declare function createRefName(name: string, options: JsonSchemaOptions): string;
7
- /**
8
- * @ignore
9
- */
10
- export declare function createRef(name: string, schema: JsonSchema, options: JsonSchemaOptions): any;
11
- /**
12
- * @ignore
13
- */
14
- export declare function toRef(value: JsonSchema, schema: any, options: JsonSchemaOptions): any;
@@ -1,7 +0,0 @@
1
- import { JsonMap } from "../domain/JsonMap";
2
- /**
3
- * @ignore
4
- */
5
- export declare function toJsonMapCollection(content: {
6
- [key: string]: any;
7
- }, klass?: typeof JsonMap): JsonMap<any>;
@@ -1,5 +0,0 @@
1
- /**
2
- * @ignore
3
- * @param pattern
4
- */
5
- export declare function toJsonRegex(pattern: string | RegExp): string;