@trapi/swagger 0.3.8 → 1.0.0-alpha.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 (154) hide show
  1. package/dist/config/index.d.ts +3 -0
  2. package/dist/config/index.d.ts.map +1 -0
  3. package/dist/config/index.js +25 -0
  4. package/dist/config/index.js.map +1 -0
  5. package/dist/config/type.d.ts +83 -0
  6. package/dist/config/type.d.ts.map +1 -0
  7. package/dist/config/type.js +9 -0
  8. package/dist/config/type.js.map +1 -0
  9. package/dist/config/utils.d.ts +3 -0
  10. package/dist/config/utils.d.ts.map +1 -0
  11. package/dist/config/utils.js +54 -0
  12. package/dist/config/utils.js.map +1 -0
  13. package/dist/constants.d.ts +15 -0
  14. package/dist/constants.d.ts.map +1 -0
  15. package/dist/constants.js +27 -0
  16. package/dist/constants.js.map +1 -0
  17. package/dist/generator/abstract.d.ts +29 -0
  18. package/dist/generator/abstract.d.ts.map +1 -0
  19. package/dist/generator/abstract.js +215 -0
  20. package/dist/generator/abstract.js.map +1 -0
  21. package/dist/{specification → generator}/index.d.ts +0 -2
  22. package/dist/generator/index.d.ts.map +1 -0
  23. package/dist/{specification → generator}/index.js +1 -3
  24. package/dist/generator/index.js.map +1 -0
  25. package/dist/generator/module.d.ts +14 -0
  26. package/dist/generator/module.d.ts.map +1 -0
  27. package/dist/generator/module.js +35 -0
  28. package/dist/generator/module.js.map +1 -0
  29. package/dist/generator/v2/index.d.ts +2 -0
  30. package/dist/generator/v2/index.d.ts.map +1 -0
  31. package/dist/{specification/utils → generator/v2}/index.js +2 -2
  32. package/dist/generator/v2/index.js.map +1 -0
  33. package/dist/generator/v2/module.d.ts +27 -0
  34. package/dist/generator/v2/module.d.ts.map +1 -0
  35. package/dist/generator/v2/module.js +517 -0
  36. package/dist/generator/v2/module.js.map +1 -0
  37. package/dist/generator/v3/index.d.ts +2 -0
  38. package/dist/generator/v3/index.d.ts.map +1 -0
  39. package/dist/generator/v3/index.js +24 -0
  40. package/dist/generator/v3/index.js.map +1 -0
  41. package/dist/generator/v3/module.d.ts +31 -0
  42. package/dist/generator/v3/module.d.ts.map +1 -0
  43. package/dist/generator/v3/module.js +508 -0
  44. package/dist/generator/v3/module.js.map +1 -0
  45. package/dist/index.d.ts +4 -2
  46. package/dist/index.d.ts.map +1 -1
  47. package/dist/index.js +4 -2
  48. package/dist/index.js.map +1 -1
  49. package/dist/metadata.d.ts +3 -4
  50. package/dist/metadata.d.ts.map +1 -1
  51. package/dist/metadata.js +3 -15
  52. package/dist/metadata.js.map +1 -1
  53. package/dist/schema/constants.d.ts +7 -0
  54. package/dist/schema/constants.d.ts.map +1 -0
  55. package/dist/schema/constants.js +17 -0
  56. package/dist/schema/constants.js.map +1 -0
  57. package/dist/schema/index.d.ts +5 -0
  58. package/dist/schema/index.d.ts.map +1 -0
  59. package/dist/schema/index.js +27 -0
  60. package/dist/schema/index.js.map +1 -0
  61. package/dist/schema/type.d.ts +140 -0
  62. package/dist/schema/type.d.ts.map +1 -0
  63. package/dist/schema/type.js.map +1 -0
  64. package/dist/schema/v2/constants.d.ts +8 -0
  65. package/dist/schema/v2/constants.d.ts.map +1 -0
  66. package/dist/schema/v2/constants.js +18 -0
  67. package/dist/schema/v2/constants.js.map +1 -0
  68. package/dist/schema/v2/index.d.ts +3 -0
  69. package/dist/schema/v2/index.d.ts.map +1 -0
  70. package/dist/{specification/v3 → schema/v2}/index.js +1 -1
  71. package/dist/schema/v2/index.js.map +1 -0
  72. package/dist/schema/v2/type.d.ts +116 -0
  73. package/dist/schema/v2/type.d.ts.map +1 -0
  74. package/dist/schema/v2/type.js.map +1 -0
  75. package/dist/schema/v3/constants.d.ts +7 -0
  76. package/dist/schema/v3/constants.d.ts.map +1 -0
  77. package/dist/schema/v3/constants.js +17 -0
  78. package/dist/schema/v3/constants.js.map +1 -0
  79. package/dist/schema/v3/index.d.ts +3 -0
  80. package/dist/schema/v3/index.d.ts.map +1 -0
  81. package/dist/{specification/v2 → schema/v3}/index.js +1 -1
  82. package/dist/schema/v3/index.js.map +1 -0
  83. package/dist/schema/v3/type.d.ts +158 -0
  84. package/dist/schema/v3/type.d.ts.map +1 -0
  85. package/dist/schema/v3/type.js +9 -0
  86. package/dist/schema/v3/type.js.map +1 -0
  87. package/dist/type.d.ts +44 -2
  88. package/dist/type.d.ts.map +1 -1
  89. package/dist/utils/character.d.ts +3 -0
  90. package/dist/utils/character.d.ts.map +1 -0
  91. package/dist/{specification/utils → utils}/character.js +4 -5
  92. package/dist/utils/character.js.map +1 -0
  93. package/dist/utils/index.d.ts +2 -1
  94. package/dist/utils/index.d.ts.map +1 -1
  95. package/dist/utils/index.js +2 -1
  96. package/dist/utils/index.js.map +1 -1
  97. package/dist/utils/object.d.ts.map +1 -1
  98. package/dist/utils/object.js +1 -0
  99. package/dist/utils/object.js.map +1 -1
  100. package/dist/utils/value.d.ts +2 -0
  101. package/dist/utils/value.d.ts.map +1 -0
  102. package/dist/utils/value.js +26 -0
  103. package/dist/utils/value.js.map +1 -0
  104. package/package.json +7 -10
  105. package/dist/module.d.ts +0 -8
  106. package/dist/module.d.ts.map +0 -1
  107. package/dist/module.js +0 -31
  108. package/dist/module.js.map +0 -1
  109. package/dist/specification/abstract.d.ts +0 -29
  110. package/dist/specification/abstract.d.ts.map +0 -1
  111. package/dist/specification/abstract.js +0 -226
  112. package/dist/specification/abstract.js.map +0 -1
  113. package/dist/specification/index.d.ts.map +0 -1
  114. package/dist/specification/index.js.map +0 -1
  115. package/dist/specification/module.d.ts +0 -5
  116. package/dist/specification/module.d.ts.map +0 -1
  117. package/dist/specification/module.js +0 -29
  118. package/dist/specification/module.js.map +0 -1
  119. package/dist/specification/type.d.ts +0 -268
  120. package/dist/specification/type.d.ts.map +0 -1
  121. package/dist/specification/type.js +0 -18
  122. package/dist/specification/type.js.map +0 -1
  123. package/dist/specification/utils/character.d.ts +0 -3
  124. package/dist/specification/utils/character.d.ts.map +0 -1
  125. package/dist/specification/utils/character.js.map +0 -1
  126. package/dist/specification/utils/index.d.ts +0 -2
  127. package/dist/specification/utils/index.d.ts.map +0 -1
  128. package/dist/specification/utils/index.js.map +0 -1
  129. package/dist/specification/v2/index.d.ts +0 -3
  130. package/dist/specification/v2/index.d.ts.map +0 -1
  131. package/dist/specification/v2/index.js.map +0 -1
  132. package/dist/specification/v2/module.d.ts +0 -24
  133. package/dist/specification/v2/module.d.ts.map +0 -1
  134. package/dist/specification/v2/module.js +0 -389
  135. package/dist/specification/v2/module.js.map +0 -1
  136. package/dist/specification/v2/type.d.ts +0 -79
  137. package/dist/specification/v2/type.d.ts.map +0 -1
  138. package/dist/specification/v2/type.js.map +0 -1
  139. package/dist/specification/v3/index.d.ts +0 -3
  140. package/dist/specification/v3/index.d.ts.map +0 -1
  141. package/dist/specification/v3/index.js.map +0 -1
  142. package/dist/specification/v3/module.d.ts +0 -25
  143. package/dist/specification/v3/module.d.ts.map +0 -1
  144. package/dist/specification/v3/module.js +0 -377
  145. package/dist/specification/v3/module.js.map +0 -1
  146. package/dist/specification/v3/type.d.ts +0 -121
  147. package/dist/specification/v3/type.d.ts.map +0 -1
  148. package/dist/specification/v3/type.js.map +0 -1
  149. package/dist/utils/package-json.d.ts +0 -3
  150. package/dist/utils/package-json.d.ts.map +0 -1
  151. package/dist/utils/package-json.js +0 -35
  152. package/dist/utils/package-json.js.map +0 -1
  153. /package/dist/{specification/v2 → schema}/type.js +0 -0
  154. /package/dist/{specification/v3 → schema/v2}/type.js +0 -0
@@ -1,268 +0,0 @@
1
- export declare namespace Specification {
2
- type DataType = 'void' | 'integer' | 'number' | 'boolean' | 'string' | 'array' | 'object' | 'file';
3
- type DataFormat = 'int32' | 'int64' | 'float' | 'double' | 'byte' | 'binary' | 'date' | 'date-time' | 'password';
4
- type Protocol = 'http' | 'https' | 'ws' | 'wss';
5
- interface BaseSpec {
6
- info: Info;
7
- tags?: Tag[];
8
- externalDocs?: ExternalDocs;
9
- }
10
- interface Info {
11
- title: string;
12
- version: string;
13
- description?: string;
14
- termsOfService?: string;
15
- contact?: Contact;
16
- license?: License;
17
- }
18
- interface Contact {
19
- name?: string;
20
- email?: string;
21
- url?: string;
22
- }
23
- interface License {
24
- name: string;
25
- url?: string;
26
- }
27
- interface ExternalDocs {
28
- url: string;
29
- description?: string;
30
- }
31
- interface Tag {
32
- name: string;
33
- description?: string;
34
- externalDocs?: ExternalDocs;
35
- }
36
- interface Examples {
37
- examples?: Record<string, Example>;
38
- }
39
- interface Example {
40
- value: unknown | unknown[];
41
- summary?: string;
42
- description?: string;
43
- }
44
- interface BaseParameter<T> {
45
- name: string;
46
- in: ParameterInType;
47
- required?: boolean;
48
- description?: string;
49
- example?: unknown;
50
- examples?: Record<string, Example | string>;
51
- schema: BaseSchema<T>;
52
- type?: DataType;
53
- format?: DataFormat;
54
- deprecated?: boolean;
55
- }
56
- interface BodyParameter<T> extends BaseParameter<T> {
57
- in: 'body';
58
- }
59
- interface QueryParameter<T> extends BaseParameter<T> {
60
- in: 'query';
61
- allowEmptyValue?: boolean;
62
- collectionFormat?: CollectionFormat;
63
- }
64
- interface PathParameter<T> extends BaseParameter<T> {
65
- in: 'path';
66
- }
67
- interface HeaderParameter<T> extends BaseParameter<T> {
68
- in: 'header';
69
- }
70
- interface FormDataParameter<T> extends BaseParameter<T> {
71
- in: 'formData';
72
- collectionFormat?: CollectionFormat;
73
- }
74
- type CollectionFormat = 'csv' | 'ssv' | 'tsv' | 'pipes' | 'multi';
75
- type ParameterInType = 'query' | 'header' | 'path' | 'formData' | 'body';
76
- type Parameter<T> = BodyParameter<T> | FormDataParameter<T> | QueryParameter<T> | PathParameter<T> | HeaderParameter<T>;
77
- interface BaseOperation<P, R, S> {
78
- responses: {
79
- [name: string]: R;
80
- };
81
- summary?: string;
82
- description?: string;
83
- externalDocs?: ExternalDocs;
84
- operationId?: string;
85
- consumes?: string[];
86
- parameters?: P[];
87
- schemes?: string[];
88
- deprecated?: boolean;
89
- security?: S[];
90
- tags?: string[];
91
- }
92
- interface BaseResponse {
93
- description: string;
94
- }
95
- interface BaseSchema<T> {
96
- type?: DataType | any;
97
- format?: DataFormat;
98
- title?: string;
99
- description?: string;
100
- default?: string | boolean | number | any;
101
- multipleOf?: number;
102
- maximum?: number;
103
- exclusiveMaximum?: number;
104
- minimum?: number;
105
- exclusiveMinimum?: number;
106
- maxLength?: number;
107
- minLength?: number;
108
- pattern?: string;
109
- maxItems?: number;
110
- minItems?: number;
111
- uniqueItems?: boolean;
112
- maxProperties?: number;
113
- minProperties?: number;
114
- enum?: Array<string | number>;
115
- 'x-enum-varnames'?: string[];
116
- items?: T | BaseSchema<T> | any;
117
- additionalProperties?: boolean | {
118
- [ref: string]: string;
119
- } | T;
120
- properties?: {
121
- [propertyName: string]: T;
122
- };
123
- discriminator?: string;
124
- readOnly?: boolean;
125
- xml?: XML;
126
- externalDocs?: ExternalDocs;
127
- example?: {
128
- [exampleName: string]: Example;
129
- } | unknown;
130
- required?: string[];
131
- $ref?: string;
132
- }
133
- interface XML {
134
- type?: string;
135
- namespace?: string;
136
- prefix?: string;
137
- attribute?: string;
138
- wrapped?: boolean;
139
- }
140
- interface BaseSecurity {
141
- description?: string;
142
- }
143
- interface Path<Operation, Parameter> {
144
- $ref?: string;
145
- get?: Operation;
146
- put?: Operation;
147
- post?: Operation;
148
- delete?: Operation;
149
- options?: Operation;
150
- head?: Operation;
151
- patch?: Operation;
152
- parameters?: Parameter[];
153
- }
154
- interface Config {
155
- /**
156
- * Support the output to be an yaml file
157
- */
158
- yaml?: boolean;
159
- /**
160
- * Generated swagger.{json|yaml} will output here
161
- */
162
- outputDirectory?: string;
163
- /**
164
- * Generated documentation base file name. Default: swagger
165
- */
166
- outputFileName?: string;
167
- /**
168
- * API host, expressTemplate.g. localhost:3000 or https://myapi.com
169
- */
170
- host?: string;
171
- /**
172
- * API version number; defaults to npm package version
173
- */
174
- version?: string;
175
- /**
176
- * API name; defaults to npm package name
177
- */
178
- name?: string;
179
- /**
180
- * 'API description; defaults to npm package description
181
- */
182
- description?: string;
183
- /**
184
- * API license; defaults to npm package license
185
- */
186
- license?: string;
187
- /**
188
- * Base API path; e.g. the 'v1' in https://myapi.com/v1
189
- */
190
- basePath?: string;
191
- /**
192
- * Inform if the generated spec will be in swagger 2.0 format or regarding the open api 3.0 specification.
193
- *
194
- * Default: V2
195
- */
196
- specification?: SpecificationOption;
197
- /**
198
- * Extend generated swagger spec with this object
199
- * Note that generated properties will always take precedence over what get specified here
200
- */
201
- specificationExtra?: Record<string, any>;
202
- /**
203
- * Security Definitions Object
204
- * A declaration of the security schemes available to be used in the
205
- * specification. This does not enforce the security schemes on the operations
206
- * and only serves to provide the relevant details for each scheme.
207
- */
208
- securityDefinitions?: SecurityDefinitions;
209
- /**
210
- * Default consumes property for the entire API
211
- */
212
- consumes?: string[];
213
- /**
214
- * Default produces property for the entire API
215
- */
216
- produces?: string[];
217
- /**
218
- * Default collectionFormat property for query parameters of array type.
219
- * Possible values are `csv`, `ssv`, `tsv`, `pipes`, `multi`. If not specified, Swagger defaults to `csv`.
220
- */
221
- collectionFormat?: string;
222
- }
223
- enum SpecificationOption {
224
- V2 = "V2",
225
- V3 = "V3"
226
- }
227
- interface SecurityDefinitions {
228
- [key: string]: SecurityDefinition;
229
- }
230
- type SecurityDefinition = ApiKeySecurity | BasicSecurity | OAuth2Security;
231
- type SecurityType = 'apiKey' | 'http' | 'oauth2';
232
- interface ApiKeySecurity extends BaseSecurity {
233
- type: 'apiKey';
234
- name: string;
235
- in: 'query' | 'header';
236
- }
237
- interface BasicSecurity extends BaseSecurity {
238
- type: 'http';
239
- schema: 'basic';
240
- }
241
- interface OAuth2Security extends BaseSecurity {
242
- type: 'oauth2';
243
- flows: {
244
- implicit?: OAuth2ImplicitFlow;
245
- password?: OAuth2PasswordFlow;
246
- authorizationCode?: OAuth2AuthorizationCodeFlow;
247
- clientCredentials?: OAuth2ClientCredentialsFlow;
248
- };
249
- }
250
- interface Oauth2BaseFlow {
251
- scopes?: Record<string, string>;
252
- refreshUrl?: string;
253
- }
254
- interface OAuth2ImplicitFlow extends Oauth2BaseFlow {
255
- authorizationUrl: string;
256
- }
257
- interface OAuth2PasswordFlow extends Oauth2BaseFlow {
258
- tokenUrl: string;
259
- }
260
- interface OAuth2AuthorizationCodeFlow extends Oauth2BaseFlow {
261
- authorizationUrl: string;
262
- tokenUrl: string;
263
- }
264
- interface OAuth2ClientCredentialsFlow extends Oauth2BaseFlow {
265
- tokenUrl: string;
266
- }
267
- }
268
- //# sourceMappingURL=type.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../src/specification/type.ts"],"names":[],"mappings":"AAOA,yBAAiB,aAAa,CAAC;IAC3B,KAAY,QAAQ,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IAE1G,KAAY,UAAU,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,GAAG,WAAW,GAAG,UAAU,CAAC;IAExH,KAAY,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,KAAK,CAAC;IAEvD,UAAiB,QAAQ;QACrB,IAAI,EAAE,IAAI,CAAC;QACX,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,YAAY,CAAC,EAAE,YAAY,CAAC;KAC/B;IAED,UAAiB,IAAI;QACjB,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,MAAM,CAAC;QAChB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,OAAO,CAAC,EAAE,OAAO,CAAC;KACrB;IAED,UAAiB,OAAO;QACpB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,GAAG,CAAC,EAA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AAE,kBAAkB,CAAC;YAC9B,iBAAiB,CAAC,EAAE,2BAA2B,CAAC;YAChD,iBAAiB,CAAC,EAAE,2BAA2B,CAAA;SAClD,CAAC;KACL;IAED,UAAiB,cAAc;QAC3B,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAChC,UAAU,CAAC,EAAE,MAAM,CAAC;KACvB;IAED,UAAiB,kBAAmB,SAAQ,cAAc;QACtD,gBAAgB,EAAE,MAAM,CAAC;KAC5B;IAED,UAAiB,kBAAmB,SAAQ,cAAc;QACtD,QAAQ,EAAE,MAAM,CAAC;KACpB;IAED,UAAiB,2BAA4B,SAAQ,cAAc;QAC/D,gBAAgB,EAAE,MAAM,CAAC;QACzB,QAAQ,EAAE,MAAM,CAAC;KACpB;IAED,UAAiB,2BAA4B,SAAQ,cAAc;QAC/D,QAAQ,EAAE,MAAM,CAAC;KACpB;CACJ"}
@@ -1,18 +0,0 @@
1
- "use strict";
2
- /*
3
- * Copyright (c) 2021.
4
- * Author Peter Placzek (tada5hi)
5
- * For the full copyright and license information,
6
- * view the LICENSE file that was distributed with this source code.
7
- */
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.Specification = void 0;
10
- var Specification;
11
- (function (Specification) {
12
- let SpecificationOption;
13
- (function (SpecificationOption) {
14
- SpecificationOption["V2"] = "V2";
15
- SpecificationOption["V3"] = "V3";
16
- })(SpecificationOption = Specification.SpecificationOption || (Specification.SpecificationOption = {}));
17
- })(Specification = exports.Specification || (exports.Specification = {}));
18
- //# sourceMappingURL=type.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"type.js","sourceRoot":"","sources":["../../src/specification/type.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,IAAiB,aAAa,CA4T7B;AA5TD,WAAiB,aAAa;IAqQ1B,IAAY,mBAGX;IAHD,WAAY,mBAAmB;QAC3B,gCAAS,CAAA;QACT,gCAAS,CAAA;IACb,CAAC,EAHW,mBAAmB,GAAnB,iCAAmB,KAAnB,iCAAmB,QAG9B;AAoDL,CAAC,EA5TgB,aAAa,GAAb,qBAAa,KAAb,qBAAa,QA4T7B"}
@@ -1,3 +0,0 @@
1
- export declare function removeRepeatingCharacter(str: string, character: string): string;
2
- export declare function removeFinalCharacter(str: string, character: string): string;
3
- //# sourceMappingURL=character.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"character.d.ts","sourceRoot":"","sources":["../../../src/specification/utils/character.ts"],"names":[],"mappings":"AASA,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAI,MAAM,CAEhF;AAED,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,UAMlE"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"character.js","sourceRoot":"","sources":["../../../src/specification/utils/character.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,8CAA8C;AAE9C,SAAgB,wBAAwB,CAAC,GAAW,EAAE,SAAiB;IACnE,OAAO,GAAG,CAAC,OAAO,CAAC,eAAe,EAAE,IAAI,CAAC,CAAC;AAC9C,CAAC;AAFD,4DAEC;AAED,SAAgB,oBAAoB,CAAC,GAAW,EAAE,SAAiB;IAC/D,OAAO,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,SAAS,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,EAAE;QAC/D,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;KAC1B;IAED,OAAO,GAAG,CAAC;AACf,CAAC;AAND,oDAMC"}
@@ -1,2 +0,0 @@
1
- export * from './character';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/specification/utils/index.ts"],"names":[],"mappings":"AAOA,cAAc,aAAa,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/specification/utils/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;AAEH,8CAA4B"}
@@ -1,3 +0,0 @@
1
- export * from './module';
2
- export * from './type';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/specification/v2/index.ts"],"names":[],"mappings":"AAOA,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/specification/v2/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;AAEH,2CAAyB;AACzB,yCAAuB"}
@@ -1,24 +0,0 @@
1
- import { EnumType, IntersectionType, ReferenceType, ResolverProperty } from '@trapi/decorators';
2
- import { SpecificationV2 } from './type';
3
- import { AbstractSpecGenerator } from '../abstract';
4
- export declare class Version2SpecGenerator extends AbstractSpecGenerator<SpecificationV2.Spec, SpecificationV2.Schema> {
5
- getSwaggerSpec(): SpecificationV2.Spec;
6
- build(): SpecificationV2.Spec;
7
- private static translateSecurityDefinitions;
8
- private buildDefinitions;
9
- private decideEnumType;
10
- private buildPaths;
11
- private buildPathMethod;
12
- private buildParameter;
13
- private handleMethodConsumes;
14
- private hasFormParams;
15
- private supportsBodyParameters;
16
- protected getSwaggerTypeForEnumType(enumType: EnumType): SpecificationV2.Schema;
17
- protected getSwaggerTypeForIntersectionType(type: IntersectionType): SpecificationV2.Schema;
18
- protected getSwaggerTypeForReferenceType(referenceType: ReferenceType): SpecificationV2.Schema;
19
- protected buildProperties(properties: ResolverProperty[]): Record<string, SpecificationV2.Schema>;
20
- private buildOperation;
21
- private getMimeType;
22
- private handleMethodProduces;
23
- }
24
- //# sourceMappingURL=module.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../src/specification/v2/module.ts"],"names":[],"mappings":"AAOA,OAAO,EACH,QAAQ,EAAE,gBAAgB,EAE1B,aAAa,EACb,gBAAgB,EAGnB,MAAM,mBAAmB,CAAC;AAW3B,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAEpD,qBAAa,qBAAsB,SAAQ,qBAAqB,CAAC,eAAe,CAAC,IAAI,EAAE,eAAe,CAAC,MAAM,CAAC;IACnG,cAAc,IAAI,eAAe,CAAC,IAAI;IAItC,KAAK,IAAK,eAAe,CAAC,IAAI;IA0CrC,OAAO,CAAC,MAAM,CAAC,4BAA4B;IAoE3C,OAAO,CAAC,gBAAgB;IA4DxB,OAAO,CAAC,cAAc;IA0BtB,OAAO,CAAC,UAAU;IAyBlB,OAAO,CAAC,eAAe;IA+CvB,OAAO,CAAC,cAAc;IAgCtB,OAAO,CAAC,oBAAoB;IAiB5B,OAAO,CAAC,aAAa;IAIrB,OAAO,CAAC,sBAAsB;IAQ9B,SAAS,CAAC,yBAAyB,CAAC,QAAQ,EAAE,QAAQ,GAAI,eAAe,CAAC,MAAM;IAYhF,SAAS,CAAC,iCAAiC,CAAC,IAAI,EAAE,gBAAgB,GAAI,eAAe,CAAC,MAAM;IAqB5F,SAAS,CAAC,8BAA8B,CAAC,aAAa,EAAE,aAAa,GAAG,eAAe,CAAC,MAAM;IAI9F,SAAS,CAAC,eAAe,CAAC,UAAU,EAAE,gBAAgB,EAAE,GAAI,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,MAAM,CAAC;IAclG,OAAO,CAAC,cAAc;IA4BtB,OAAO,CAAC,WAAW;IAgBnB,OAAO,CAAC,oBAAoB;CAO/B"}