@visulima/jsdoc-open-api 3.0.0-alpha.2 → 3.0.0-alpha.21
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.
- package/CHANGELOG.md +220 -0
- package/LICENSE.md +35 -1
- package/dist/cli/commander/index.cjs +1 -0
- package/dist/cli/commander/index.d.cts +1000 -0
- package/dist/cli/commander/index.d.mts +996 -3
- package/dist/cli/commander/index.d.ts +996 -3
- package/dist/cli/commander/index.mjs +1 -30
- package/dist/cli/index.cjs +1 -0
- package/dist/cli/index.d.cts +8 -0
- package/dist/cli/index.d.mts +4 -6
- package/dist/cli/index.d.ts +4 -6
- package/dist/cli/index.mjs +1 -4
- package/dist/index.cjs +1 -0
- package/dist/index.d.cts +247 -0
- package/dist/index.d.mts +176 -177
- package/dist/index.d.ts +176 -177
- package/dist/index.mjs +1 -85
- package/dist/packem_shared/SpecBuilder-CR4EZk93.cjs +1 -0
- package/dist/packem_shared/SpecBuilder-DjnDJFpv.mjs +1 -0
- package/dist/packem_shared/SwaggerCompilerPlugin-CLoD91_H.mjs +1 -0
- package/dist/packem_shared/SwaggerCompilerPlugin-lwIg0m84.cjs +1 -0
- package/dist/packem_shared/customizer-COfd-Xr1.mjs +1 -0
- package/dist/packem_shared/customizer-DUz3nxAJ.cjs +1 -0
- package/dist/packem_shared/generateCommand-BQuj1FCe.cjs +1 -0
- package/dist/packem_shared/generateCommand-Bn19mSDL.mjs +1 -0
- package/dist/packem_shared/generateCommand-DLJ2Ac1D.mjs +4 -0
- package/dist/packem_shared/generateCommand-DPOEw62Z.cjs +4 -0
- package/dist/packem_shared/initCommand-Bm4veOwd.mjs +1 -0
- package/dist/packem_shared/initCommand-CiV7G3q4.cjs +35 -0
- package/dist/packem_shared/initCommand-CwoPwelm.mjs +35 -0
- package/dist/packem_shared/initCommand-DAcI_ilX.cjs +1 -0
- package/dist/packem_shared/jsDocumentCommentsToOpenApi-Bvfi25DQ.mjs +1 -0
- package/dist/packem_shared/jsDocumentCommentsToOpenApi-DBYlHL5i.cjs +1 -0
- package/dist/packem_shared/parseFile-C7tyTcIn.cjs +1 -0
- package/dist/packem_shared/parseFile-CtAVjmPd.mjs +1 -0
- package/dist/packem_shared/swaggerJsDocumentCommentsToOpenApi-Bo1geBuG.cjs +10 -0
- package/dist/packem_shared/swaggerJsDocumentCommentsToOpenApi-xKOqHvN2.mjs +10 -0
- package/dist/packem_shared/validate-_k84qawx.mjs +1 -0
- package/dist/packem_shared/validate-tZa-jyuN.cjs +1 -0
- package/dist/packem_shared/yamlLoc-C2tVIYaz.mjs +1 -0
- package/dist/packem_shared/yamlLoc-DyGcp8YC.cjs +1 -0
- package/package.json +66 -54
- package/dist/chunk-46IWFMQ2.mjs +0 -1205
- package/dist/chunk-46IWFMQ2.mjs.map +0 -1
- package/dist/chunk-KI63G47G.mjs +0 -142
- package/dist/chunk-KI63G47G.mjs.map +0 -1
- package/dist/chunk-QK4CXNUY.js +0 -149
- package/dist/chunk-QK4CXNUY.js.map +0 -1
- package/dist/chunk-WEX5DMNT.js +0 -1223
- package/dist/chunk-WEX5DMNT.js.map +0 -1
- package/dist/cli/commander/index.js +0 -33
- package/dist/cli/commander/index.js.map +0 -1
- package/dist/cli/commander/index.mjs.map +0 -1
- package/dist/cli/index.js +0 -17
- package/dist/cli/index.js.map +0 -1
- package/dist/cli/index.mjs.map +0 -1
- package/dist/index.js +0 -106
- package/dist/index.js.map +0 -1
- package/dist/index.mjs.map +0 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,248 +1,247 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import 'buffer';
|
|
2
|
+
import 'http';
|
|
3
|
+
import 'https';
|
|
4
|
+
import 'inspector';
|
|
5
|
+
import 'net';
|
|
6
|
+
import 'url';
|
|
7
|
+
import 'vm';
|
|
3
8
|
interface BaseDefinition {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
components?: ComponentsObject;
|
|
10
|
+
externalDocs?: ExternalDocumentationObject;
|
|
11
|
+
info: InfoObject;
|
|
12
|
+
openapi: string;
|
|
13
|
+
paths?: PathsObject;
|
|
14
|
+
security?: SecurityRequirementObject[];
|
|
15
|
+
servers?: ServerObject[];
|
|
16
|
+
tags?: TagObject[];
|
|
12
17
|
}
|
|
13
18
|
interface OpenApiObject extends BaseDefinition {
|
|
14
|
-
|
|
19
|
+
paths?: PathsObject;
|
|
15
20
|
}
|
|
16
21
|
interface InfoObject {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
contact?: ContactObject;
|
|
23
|
+
description?: string;
|
|
24
|
+
license?: LicenseObject;
|
|
25
|
+
termsOfService?: string;
|
|
26
|
+
title: string;
|
|
27
|
+
version: string;
|
|
23
28
|
}
|
|
24
29
|
interface ContactObject {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
30
|
+
email?: string;
|
|
31
|
+
name?: string;
|
|
32
|
+
url?: string;
|
|
28
33
|
}
|
|
29
34
|
interface LicenseObject {
|
|
30
|
-
|
|
31
|
-
|
|
35
|
+
name: string;
|
|
36
|
+
url?: string;
|
|
32
37
|
}
|
|
33
38
|
interface ServerObject {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
39
|
+
description?: string;
|
|
40
|
+
url: string;
|
|
41
|
+
variables?: Map<ServerVariable>;
|
|
37
42
|
}
|
|
38
43
|
interface ServerVariable {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
44
|
+
default: string;
|
|
45
|
+
description?: string;
|
|
46
|
+
enum?: string[];
|
|
42
47
|
}
|
|
43
48
|
interface ComponentsObject {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
49
|
+
callbacks?: Map<CallbackObject | ReferenceObject>;
|
|
50
|
+
examples?: Map<ExampleObject | ReferenceObject>;
|
|
51
|
+
headers?: Map<HeaderObject | ReferenceObject>;
|
|
52
|
+
links?: Map<LinkObject | ReferenceObject>;
|
|
53
|
+
parameters?: Map<ParameterObject | ReferenceObject>;
|
|
54
|
+
requestBodies?: Map<ReferenceObject | RequestBodyObject>;
|
|
55
|
+
responses?: Map<ReferenceObject | ResponseObject>;
|
|
56
|
+
schemas?: Map<ReferenceObject | SchemaObject>;
|
|
57
|
+
securitySchemes?: Map<ApiKeySecuritySchemeObject | HttpSecuritySchemeObject | Oauth2SecuritySchemeObject | OpenIdConnectSecuritySchemeObject | ReferenceObject>;
|
|
53
58
|
}
|
|
54
59
|
type PathsObject = Record<string, PathItemObject>;
|
|
55
60
|
interface PathItemObject {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
61
|
+
$ref?: string;
|
|
62
|
+
delete?: OperationObject;
|
|
63
|
+
description?: string;
|
|
64
|
+
get?: OperationObject;
|
|
65
|
+
head?: OperationObject;
|
|
66
|
+
options?: OperationObject;
|
|
67
|
+
parameters?: (ParameterObject | ReferenceObject)[];
|
|
68
|
+
patch?: OperationObject;
|
|
69
|
+
post?: OperationObject;
|
|
70
|
+
put?: OperationObject;
|
|
71
|
+
servers?: ServerObject[];
|
|
72
|
+
summary?: string;
|
|
73
|
+
trace?: OperationObject;
|
|
69
74
|
}
|
|
70
75
|
interface OperationObject {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
76
|
+
callbacks?: Map<CallbackObject | ReferenceObject>;
|
|
77
|
+
deprecated?: boolean;
|
|
78
|
+
description?: string;
|
|
79
|
+
externalDocs?: ExternalDocumentationObject;
|
|
80
|
+
operationId?: string;
|
|
81
|
+
parameters?: (ParameterObject | ReferenceObject)[];
|
|
82
|
+
requestBody?: ReferenceObject | RequestBodyObject;
|
|
83
|
+
responses: ResponsesObject;
|
|
84
|
+
security?: SecurityRequirementObject[];
|
|
85
|
+
servers?: ServerObject[];
|
|
86
|
+
summary?: string;
|
|
87
|
+
tags?: string[];
|
|
83
88
|
}
|
|
84
89
|
interface ExternalDocumentationObject {
|
|
85
|
-
|
|
86
|
-
|
|
90
|
+
description?: string;
|
|
91
|
+
url: string;
|
|
87
92
|
}
|
|
88
93
|
interface ParameterObject {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
94
|
+
allowEmptyValue?: boolean;
|
|
95
|
+
allowReserved?: boolean;
|
|
96
|
+
content?: Map<MediaTypeObject>;
|
|
97
|
+
deprecated?: boolean;
|
|
98
|
+
description?: string;
|
|
99
|
+
example?: any;
|
|
100
|
+
examples?: Map<ExampleObject | ReferenceObject>;
|
|
101
|
+
explode?: string;
|
|
102
|
+
in: string;
|
|
103
|
+
name: string;
|
|
104
|
+
required?: boolean;
|
|
105
|
+
schema?: ReferenceObject | SchemaObject;
|
|
106
|
+
style?: string;
|
|
102
107
|
}
|
|
103
108
|
interface RequestBodyObject {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
109
|
+
content: Map<MediaTypeObject>;
|
|
110
|
+
description?: string;
|
|
111
|
+
required?: boolean;
|
|
107
112
|
}
|
|
108
113
|
interface MediaTypeObject {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
114
|
+
encoding?: Map<EncodingObject>;
|
|
115
|
+
example?: any;
|
|
116
|
+
examples?: Map<ExampleObject | ReferenceObject>;
|
|
117
|
+
schema?: ReferenceObject | SchemaObject;
|
|
113
118
|
}
|
|
114
119
|
interface EncodingObject {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
+
allowReserved?: boolean;
|
|
121
|
+
contentType?: string;
|
|
122
|
+
explode?: boolean;
|
|
123
|
+
headers?: Map<HeaderObject | ReferenceObject>;
|
|
124
|
+
style?: string;
|
|
120
125
|
}
|
|
121
126
|
type ResponsesObject = Record<string, ReferenceObject | ResponseObject>;
|
|
122
127
|
interface ResponseObject {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
128
|
+
content?: Map<MediaTypeObject>;
|
|
129
|
+
description: string;
|
|
130
|
+
headers?: Map<HeaderObject | ReferenceObject>;
|
|
131
|
+
links?: Map<LinkObject | ReferenceObject>;
|
|
127
132
|
}
|
|
128
133
|
type CallbackObject = Record<string, PathItemObject>;
|
|
129
134
|
interface ExampleObject {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
135
|
+
description?: string;
|
|
136
|
+
externalValue?: string;
|
|
137
|
+
summary?: string;
|
|
138
|
+
value?: any;
|
|
134
139
|
}
|
|
135
140
|
interface LinkObject {
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
141
|
+
description?: string;
|
|
142
|
+
operationId?: string;
|
|
143
|
+
operationRef?: string;
|
|
144
|
+
parameters?: Map<any>;
|
|
145
|
+
requestBody?: any;
|
|
146
|
+
server?: ServerObject;
|
|
142
147
|
}
|
|
143
148
|
interface HeaderObject {
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
149
|
+
allowEmptyValue?: boolean;
|
|
150
|
+
allowReserved?: boolean;
|
|
151
|
+
content?: Map<MediaTypeObject>;
|
|
152
|
+
deprecated?: boolean;
|
|
153
|
+
description?: string;
|
|
154
|
+
example?: any;
|
|
155
|
+
examples?: Map<ExampleObject | ReferenceObject>;
|
|
156
|
+
explode?: string;
|
|
157
|
+
required?: boolean;
|
|
158
|
+
schema?: ReferenceObject | SchemaObject;
|
|
159
|
+
style?: string;
|
|
155
160
|
}
|
|
156
161
|
interface TagObject {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
162
|
+
description?: string;
|
|
163
|
+
externalDocs?: ExternalDocumentationObject;
|
|
164
|
+
name: string;
|
|
160
165
|
}
|
|
161
166
|
interface ReferenceObject {
|
|
162
|
-
|
|
167
|
+
$ref: string;
|
|
163
168
|
}
|
|
164
169
|
type SchemaObject = Record<string, any>;
|
|
165
170
|
interface ApiKeySecuritySchemeObject {
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
171
|
+
description?: string;
|
|
172
|
+
in: string;
|
|
173
|
+
name: string;
|
|
174
|
+
type: string;
|
|
170
175
|
}
|
|
171
176
|
interface HttpSecuritySchemeObject {
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
177
|
+
bearerFormat?: string;
|
|
178
|
+
description?: string;
|
|
179
|
+
scheme: string;
|
|
180
|
+
type: string;
|
|
176
181
|
}
|
|
177
182
|
interface Oauth2SecuritySchemeObject {
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
183
|
+
description?: string;
|
|
184
|
+
flows: OAuthFlowsObject;
|
|
185
|
+
type: string;
|
|
181
186
|
}
|
|
182
187
|
interface OpenIdConnectSecuritySchemeObject {
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
188
|
+
description?: string;
|
|
189
|
+
openIdConnectUrl: string;
|
|
190
|
+
type: string;
|
|
186
191
|
}
|
|
187
192
|
interface OAuthFlowsObject {
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
193
|
+
authorizationCode?: OAuthFlowObject;
|
|
194
|
+
clientCredentials?: OAuthFlowObject;
|
|
195
|
+
implicit?: OAuthFlowObject;
|
|
196
|
+
password?: OAuthFlowObject;
|
|
192
197
|
}
|
|
193
198
|
interface OAuthFlowObject {
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
199
|
+
authorizationUrl?: string;
|
|
200
|
+
refreshUrl: string;
|
|
201
|
+
scopes: Map<string>;
|
|
202
|
+
tokenUrl?: string;
|
|
198
203
|
}
|
|
199
204
|
type SecurityRequirementObject = Record<string, string[]>;
|
|
200
205
|
type Map<T> = Record<string, T>;
|
|
201
|
-
|
|
202
206
|
declare const commentsToOpenApi$1: (fileContents: string, verbose?: boolean) => {
|
|
203
|
-
|
|
204
|
-
|
|
207
|
+
loc: number;
|
|
208
|
+
spec: OpenApiObject;
|
|
205
209
|
}[];
|
|
206
|
-
|
|
207
210
|
declare const parseFile: (file: string, commentsToOpenApi: (fileContent: string, verbose?: boolean) => {
|
|
208
|
-
|
|
209
|
-
|
|
211
|
+
loc: number;
|
|
212
|
+
spec: OpenApiObject;
|
|
210
213
|
}[], verbose?: boolean) => {
|
|
211
|
-
|
|
212
|
-
|
|
214
|
+
loc: number;
|
|
215
|
+
spec: OpenApiObject;
|
|
213
216
|
}[];
|
|
214
|
-
|
|
215
217
|
declare class SpecBuilder implements OpenApiObject {
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
}
|
|
227
|
-
|
|
218
|
+
components?: ComponentsObject;
|
|
219
|
+
externalDocs?: ExternalDocumentationObject;
|
|
220
|
+
info: InfoObject;
|
|
221
|
+
openapi: string;
|
|
222
|
+
paths: PathsObject;
|
|
223
|
+
security?: SecurityRequirementObject[];
|
|
224
|
+
servers?: ServerObject[];
|
|
225
|
+
tags?: TagObject[];
|
|
226
|
+
constructor(baseDefinition: BaseDefinition);
|
|
227
|
+
addData(parsedFile: OpenApiObject[]): void;
|
|
228
|
+
}
|
|
228
229
|
declare const commentsToOpenApi: (fileContents: string, verbose?: boolean) => {
|
|
229
|
-
|
|
230
|
-
|
|
230
|
+
loc: number;
|
|
231
|
+
spec: OpenApiObject;
|
|
231
232
|
}[];
|
|
232
|
-
|
|
233
233
|
declare const yamlLoc: (string: string) => number;
|
|
234
|
-
|
|
234
|
+
type WebpackCompiler = undefined;
|
|
235
235
|
declare class SwaggerCompilerPlugin {
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
}
|
|
247
|
-
|
|
236
|
+
private readonly assetsPath;
|
|
237
|
+
private readonly ignore;
|
|
238
|
+
private readonly sources;
|
|
239
|
+
private readonly swaggerDefinition;
|
|
240
|
+
private readonly verbose;
|
|
241
|
+
constructor(assetsPath: string, sources: string[], swaggerDefinition: BaseDefinition, options: {
|
|
242
|
+
ignore?: (RegExp | string)[];
|
|
243
|
+
verbose?: boolean;
|
|
244
|
+
});
|
|
245
|
+
apply(compiler: WebpackCompiler): void;
|
|
246
|
+
}
|
|
248
247
|
export { type BaseDefinition, type OpenApiObject, SpecBuilder, SwaggerCompilerPlugin, commentsToOpenApi$1 as jsDocumentCommentsToOpenApi, parseFile, commentsToOpenApi as swaggerJsDocumentCommentsToOpenApi, yamlLoc };
|