@gyeonghokim/bruno-to-openapi 0.0.0 → 1.0.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.
- package/.github/workflows/release.yml +5 -2
- package/.github/workflows/test.yml +37 -0
- package/.releaserc.json +3 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +72 -0
- package/dist/models/bruno-collection.d.ts +35 -0
- package/dist/models/bruno-collection.d.ts.map +1 -0
- package/dist/models/bruno-collection.js +56 -0
- package/dist/services/conversion-service.d.ts +17 -0
- package/dist/services/conversion-service.d.ts.map +1 -0
- package/dist/services/conversion-service.js +18 -0
- package/dist/types/bruno.d.ts +267 -0
- package/dist/types/bruno.d.ts.map +1 -0
- package/dist/types/bruno.js +4 -0
- package/dist/types/index.d.ts +10 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +4 -0
- package/dist/types/openapi.d.ts +251 -0
- package/dist/types/openapi.d.ts.map +1 -0
- package/dist/types/openapi.js +4 -0
- package/dist/types/result.d.ts +26 -0
- package/dist/types/result.d.ts.map +1 -0
- package/dist/types/result.js +4 -0
- package/dist/utils/bruno-parser.d.ts +51 -0
- package/dist/utils/bruno-parser.d.ts.map +1 -0
- package/dist/utils/bruno-parser.js +391 -0
- package/dist/utils/file-reader.d.ts +34 -0
- package/dist/utils/file-reader.d.ts.map +1 -0
- package/dist/utils/file-reader.js +104 -0
- package/dist/utils/openapi-generator.d.ts +53 -0
- package/dist/utils/openapi-generator.d.ts.map +1 -0
- package/dist/utils/openapi-generator.js +524 -0
- package/package.json +14 -1
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
export interface OpenAPIObject {
|
|
2
|
+
openapi: '3.0.0';
|
|
3
|
+
info: InfoObject;
|
|
4
|
+
paths: {
|
|
5
|
+
[path: string]: PathItemObject;
|
|
6
|
+
};
|
|
7
|
+
servers?: ServerObject[];
|
|
8
|
+
components?: ComponentsObject;
|
|
9
|
+
security?: SecurityRequirementObject[];
|
|
10
|
+
tags?: TagObject[];
|
|
11
|
+
externalDocs?: ExternalDocumentationObject;
|
|
12
|
+
}
|
|
13
|
+
export interface InfoObject {
|
|
14
|
+
title: string;
|
|
15
|
+
description?: string;
|
|
16
|
+
termsOfService?: string;
|
|
17
|
+
contact?: ContactObject;
|
|
18
|
+
license?: LicenseObject;
|
|
19
|
+
version: string;
|
|
20
|
+
}
|
|
21
|
+
export interface ContactObject {
|
|
22
|
+
name?: string;
|
|
23
|
+
url?: string;
|
|
24
|
+
email?: string;
|
|
25
|
+
}
|
|
26
|
+
export interface LicenseObject {
|
|
27
|
+
name: string;
|
|
28
|
+
url?: string;
|
|
29
|
+
}
|
|
30
|
+
export interface ServerObject {
|
|
31
|
+
url: string;
|
|
32
|
+
description?: string;
|
|
33
|
+
variables?: {
|
|
34
|
+
[name: string]: ServerVariableObject;
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export interface ServerVariableObject {
|
|
38
|
+
enum?: string[];
|
|
39
|
+
default: string;
|
|
40
|
+
description?: string;
|
|
41
|
+
}
|
|
42
|
+
export interface PathItemObject {
|
|
43
|
+
$ref?: string;
|
|
44
|
+
summary?: string;
|
|
45
|
+
description?: string;
|
|
46
|
+
get?: OperationObject;
|
|
47
|
+
put?: OperationObject;
|
|
48
|
+
post?: OperationObject;
|
|
49
|
+
delete?: OperationObject;
|
|
50
|
+
options?: OperationObject;
|
|
51
|
+
head?: OperationObject;
|
|
52
|
+
patch?: OperationObject;
|
|
53
|
+
trace?: OperationObject;
|
|
54
|
+
servers?: ServerObject[];
|
|
55
|
+
parameters?: (ParameterObject | ReferenceObject)[];
|
|
56
|
+
}
|
|
57
|
+
export interface OperationObject {
|
|
58
|
+
tags?: string[];
|
|
59
|
+
summary?: string;
|
|
60
|
+
description?: string;
|
|
61
|
+
externalDocs?: ExternalDocumentationObject;
|
|
62
|
+
operationId?: string;
|
|
63
|
+
parameters?: (ParameterObject | ReferenceObject)[];
|
|
64
|
+
requestBody?: RequestBodyObject | ReferenceObject;
|
|
65
|
+
responses: ResponsesObject;
|
|
66
|
+
callbacks?: {
|
|
67
|
+
[name: string]: CallbackObject | ReferenceObject;
|
|
68
|
+
};
|
|
69
|
+
deprecated?: boolean;
|
|
70
|
+
security?: SecurityRequirementObject[];
|
|
71
|
+
servers?: ServerObject[];
|
|
72
|
+
}
|
|
73
|
+
export interface ExternalDocumentationObject {
|
|
74
|
+
description?: string;
|
|
75
|
+
url: string;
|
|
76
|
+
}
|
|
77
|
+
export interface ParameterObject {
|
|
78
|
+
name: string;
|
|
79
|
+
in: 'query' | 'header' | 'path' | 'cookie';
|
|
80
|
+
description?: string;
|
|
81
|
+
required?: boolean;
|
|
82
|
+
deprecated?: boolean;
|
|
83
|
+
allowEmptyValue?: boolean;
|
|
84
|
+
style?: string;
|
|
85
|
+
explode?: boolean;
|
|
86
|
+
allowReserved?: boolean;
|
|
87
|
+
schema?: SchemaObject | ReferenceObject;
|
|
88
|
+
example?: string | number | boolean | object | null;
|
|
89
|
+
examples?: {
|
|
90
|
+
[name: string]: ExampleObject | ReferenceObject;
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
export interface RequestBodyObject {
|
|
94
|
+
description?: string;
|
|
95
|
+
content: {
|
|
96
|
+
[contentType: string]: MediaTypeObject;
|
|
97
|
+
};
|
|
98
|
+
required?: boolean;
|
|
99
|
+
}
|
|
100
|
+
export interface MediaTypeObject {
|
|
101
|
+
schema?: SchemaObject | ReferenceObject;
|
|
102
|
+
example?: string | number | boolean | object | null;
|
|
103
|
+
examples?: {
|
|
104
|
+
[name: string]: ExampleObject | ReferenceObject;
|
|
105
|
+
};
|
|
106
|
+
encoding?: {
|
|
107
|
+
[name: string]: EncodingObject;
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
export interface EncodingObject {
|
|
111
|
+
contentType?: string;
|
|
112
|
+
headers?: {
|
|
113
|
+
[name: string]: HeaderObject | ReferenceObject;
|
|
114
|
+
};
|
|
115
|
+
style?: string;
|
|
116
|
+
explode?: boolean;
|
|
117
|
+
allowReserved?: boolean;
|
|
118
|
+
}
|
|
119
|
+
export interface HeaderObject {
|
|
120
|
+
description?: string;
|
|
121
|
+
required?: boolean;
|
|
122
|
+
deprecated?: boolean;
|
|
123
|
+
allowEmptyValue?: boolean;
|
|
124
|
+
style?: string;
|
|
125
|
+
explode?: boolean;
|
|
126
|
+
allowReserved?: boolean;
|
|
127
|
+
schema?: SchemaObject | ReferenceObject;
|
|
128
|
+
example?: string | number | boolean | object | null;
|
|
129
|
+
examples?: {
|
|
130
|
+
[name: string]: ExampleObject | ReferenceObject;
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
export interface ResponsesObject {
|
|
134
|
+
[status: string]: ResponseObject | ReferenceObject;
|
|
135
|
+
}
|
|
136
|
+
export interface ResponseObject {
|
|
137
|
+
description: string;
|
|
138
|
+
headers?: {
|
|
139
|
+
[name: string]: HeaderObject | ReferenceObject;
|
|
140
|
+
};
|
|
141
|
+
content?: {
|
|
142
|
+
[contentType: string]: MediaTypeObject;
|
|
143
|
+
};
|
|
144
|
+
links?: {
|
|
145
|
+
[name: string]: LinkObject | ReferenceObject;
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
export interface CallbackObject {
|
|
149
|
+
[name: string]: PathItemObject;
|
|
150
|
+
}
|
|
151
|
+
export interface ExampleObject {
|
|
152
|
+
summary?: string;
|
|
153
|
+
description?: string;
|
|
154
|
+
value?: string | number | boolean | object | null;
|
|
155
|
+
externalValue?: string;
|
|
156
|
+
}
|
|
157
|
+
export interface LinkObject {
|
|
158
|
+
operationRef?: string;
|
|
159
|
+
operationId?: string;
|
|
160
|
+
parameters?: {
|
|
161
|
+
[name: string]: string | number | boolean | object | null;
|
|
162
|
+
};
|
|
163
|
+
requestBody?: string | number | boolean | object | null;
|
|
164
|
+
description?: string;
|
|
165
|
+
server?: ServerObject;
|
|
166
|
+
}
|
|
167
|
+
export interface SchemaObject {
|
|
168
|
+
type?: string;
|
|
169
|
+
properties?: {
|
|
170
|
+
[name: string]: SchemaObject | ReferenceObject;
|
|
171
|
+
};
|
|
172
|
+
items?: SchemaObject | ReferenceObject;
|
|
173
|
+
required?: string[];
|
|
174
|
+
description?: string;
|
|
175
|
+
format?: string;
|
|
176
|
+
default?: string | number | boolean | object | null;
|
|
177
|
+
nullable?: boolean;
|
|
178
|
+
enum?: (string | number | boolean | object | null)[];
|
|
179
|
+
minimum?: number;
|
|
180
|
+
maximum?: number;
|
|
181
|
+
minLength?: number;
|
|
182
|
+
maxLength?: number;
|
|
183
|
+
pattern?: string;
|
|
184
|
+
[property: string]: unknown;
|
|
185
|
+
}
|
|
186
|
+
export interface ReferenceObject {
|
|
187
|
+
$ref: string;
|
|
188
|
+
}
|
|
189
|
+
export interface ComponentsObject {
|
|
190
|
+
schemas?: {
|
|
191
|
+
[name: string]: SchemaObject | ReferenceObject;
|
|
192
|
+
};
|
|
193
|
+
responses?: {
|
|
194
|
+
[name: string]: ResponseObject | ReferenceObject;
|
|
195
|
+
};
|
|
196
|
+
parameters?: {
|
|
197
|
+
[name: string]: ParameterObject | ReferenceObject;
|
|
198
|
+
};
|
|
199
|
+
examples?: {
|
|
200
|
+
[name: string]: ExampleObject | ReferenceObject;
|
|
201
|
+
};
|
|
202
|
+
requestBodies?: {
|
|
203
|
+
[name: string]: RequestBodyObject | ReferenceObject;
|
|
204
|
+
};
|
|
205
|
+
headers?: {
|
|
206
|
+
[name: string]: HeaderObject | ReferenceObject;
|
|
207
|
+
};
|
|
208
|
+
securitySchemes?: {
|
|
209
|
+
[name: string]: SecuritySchemeObject | ReferenceObject;
|
|
210
|
+
};
|
|
211
|
+
links?: {
|
|
212
|
+
[name: string]: LinkObject | ReferenceObject;
|
|
213
|
+
};
|
|
214
|
+
callbacks?: {
|
|
215
|
+
[name: string]: CallbackObject | ReferenceObject;
|
|
216
|
+
};
|
|
217
|
+
[key: string]: unknown;
|
|
218
|
+
}
|
|
219
|
+
export interface SecuritySchemeObject {
|
|
220
|
+
type: 'apiKey' | 'http' | 'oauth2' | 'openIdConnect';
|
|
221
|
+
description?: string;
|
|
222
|
+
name?: string;
|
|
223
|
+
in?: 'query' | 'header' | 'cookie';
|
|
224
|
+
scheme?: string;
|
|
225
|
+
bearerFormat?: string;
|
|
226
|
+
flows?: OAuthFlowsObject;
|
|
227
|
+
openIdConnectUrl?: string;
|
|
228
|
+
}
|
|
229
|
+
export interface OAuthFlowsObject {
|
|
230
|
+
implicit?: OAuthFlowObject;
|
|
231
|
+
password?: OAuthFlowObject;
|
|
232
|
+
clientCredentials?: OAuthFlowObject;
|
|
233
|
+
authorizationCode?: OAuthFlowObject;
|
|
234
|
+
}
|
|
235
|
+
export interface OAuthFlowObject {
|
|
236
|
+
authorizationUrl?: string;
|
|
237
|
+
tokenUrl?: string;
|
|
238
|
+
refreshUrl?: string;
|
|
239
|
+
scopes: {
|
|
240
|
+
[scope: string]: string;
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
export interface SecurityRequirementObject {
|
|
244
|
+
[name: string]: string[];
|
|
245
|
+
}
|
|
246
|
+
export interface TagObject {
|
|
247
|
+
name: string;
|
|
248
|
+
description?: string;
|
|
249
|
+
externalDocs?: ExternalDocumentationObject;
|
|
250
|
+
}
|
|
251
|
+
//# sourceMappingURL=openapi.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"openapi.d.ts","sourceRoot":"","sources":["../../src/types/openapi.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,OAAO,CAAA;IAChB,IAAI,EAAE,UAAU,CAAA;IAChB,KAAK,EAAE;QAAE,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,CAAA;KAAE,CAAA;IACzC,OAAO,CAAC,EAAE,YAAY,EAAE,CAAA;IACxB,UAAU,CAAC,EAAE,gBAAgB,CAAA;IAC7B,QAAQ,CAAC,EAAE,yBAAyB,EAA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AC1B,QAAQ,CAAC,EAAE,eAAe,CAAA;IAC1B,iBAAiB,CAAC,EAAE,eAAe,CAAA;IACnC,iBAAiB,CAAC,EAAE,eAAe,CAAA;CACpC;AAED,MAAM,WAAW,eAAe;IAC9B,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,MAAM,EAAE;QAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;CACpC;AAED,MAAM,WAAW,yBAAyB;IACxC,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;CACzB;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,YAAY,CAAC,EAAE,2BAA2B,CAAA;CAC3C"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { OpenAPIObject } from './openapi';
|
|
2
|
+
export interface ConvertResult {
|
|
3
|
+
/**
|
|
4
|
+
* The generated OpenAPI 3.0 specification object
|
|
5
|
+
*/
|
|
6
|
+
spec: OpenAPIObject;
|
|
7
|
+
/**
|
|
8
|
+
* Warnings encountered during the conversion process
|
|
9
|
+
*/
|
|
10
|
+
warnings: ConvertWarning[];
|
|
11
|
+
/**
|
|
12
|
+
* Optional YAML string representation of the OpenAPI spec
|
|
13
|
+
*/
|
|
14
|
+
content?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface ConvertWarning {
|
|
17
|
+
/**
|
|
18
|
+
* Description of the warning
|
|
19
|
+
*/
|
|
20
|
+
message: string;
|
|
21
|
+
/**
|
|
22
|
+
* Name of the item that generated the warning
|
|
23
|
+
*/
|
|
24
|
+
itemName: string;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=result.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"result.d.ts","sourceRoot":"","sources":["../../src/types/result.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AAE9C,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,IAAI,EAAE,aAAa,CAAA;IAEnB;;OAEG;IACH,QAAQ,EAAE,cAAc,EAAE,CAAA;IAE1B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;IAEf;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAA;CACjB"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { BrunoCollection, BrunoItem } from '../types/bruno';
|
|
2
|
+
/**
|
|
3
|
+
* Utility functions for parsing Bruno collection structures
|
|
4
|
+
*/
|
|
5
|
+
export declare class BrunoParser {
|
|
6
|
+
/**
|
|
7
|
+
* Parses a Bruno collection from a directory path
|
|
8
|
+
*/
|
|
9
|
+
static parseCollection(collectionPath: string): Promise<BrunoCollection>;
|
|
10
|
+
/**
|
|
11
|
+
* Parses individual .bru files into BrunoItem structures
|
|
12
|
+
*/
|
|
13
|
+
static parseBruFiles(bruFilePaths: string[], collectionPath: string): Promise<BrunoItem[]>;
|
|
14
|
+
/**
|
|
15
|
+
* Parses the content of a single .bru file into a BrunoItem
|
|
16
|
+
*/
|
|
17
|
+
static parseBruContent(content: string, relativePath: string): Promise<BrunoItem>;
|
|
18
|
+
/**
|
|
19
|
+
* Parses the meta section of a .bru file
|
|
20
|
+
*/
|
|
21
|
+
private static parseMetaSection;
|
|
22
|
+
/**
|
|
23
|
+
* Parses the request section of a .bru file
|
|
24
|
+
*/
|
|
25
|
+
private static parseRequestSection;
|
|
26
|
+
/**
|
|
27
|
+
* Parses the headers section of a .bru file
|
|
28
|
+
*/
|
|
29
|
+
private static parseHeadersSection;
|
|
30
|
+
/**
|
|
31
|
+
* Parses the params section of a .bru file
|
|
32
|
+
*/
|
|
33
|
+
private static parseParamsSection;
|
|
34
|
+
/**
|
|
35
|
+
* Parses the body section of a .bru file
|
|
36
|
+
*/
|
|
37
|
+
private static parseBodySection;
|
|
38
|
+
/**
|
|
39
|
+
* Parses the auth section of a .bru file
|
|
40
|
+
*/
|
|
41
|
+
private static parseAuthSection;
|
|
42
|
+
/**
|
|
43
|
+
* Validates if a given path contains a valid Bruno collection
|
|
44
|
+
*/
|
|
45
|
+
static isValidCollection(collectionPath: string): Promise<boolean>;
|
|
46
|
+
/**
|
|
47
|
+
* Generates a unique identifier
|
|
48
|
+
*/
|
|
49
|
+
private static generateUid;
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=bruno-parser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bruno-parser.d.ts","sourceRoot":"","sources":["../../src/utils/bruno-parser.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAGV,eAAe,EAGf,SAAS,EAMV,MAAM,gBAAgB,CAAA;AAGvB;;GAEG;AACH,qBAAa,WAAW;IACtB;;OAEG;WACU,eAAe,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;IA6F9E;;OAEG;WACU,aAAa,CAAC,YAAY,EAAE,MAAM,EAAE,EAAE,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC;IAiBhG;;OAEG;WACU,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC;IAmGvF;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,gBAAgB;IAkB/B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,mBAAmB;IAoBlC;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,mBAAmB;IA0BlC;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,kBAAkB;IA2BjC;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,gBAAgB;IAmC/B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,gBAAgB;IAgD/B;;OAEG;WACU,iBAAiB,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAoBxE;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,WAAW;CAK3B"}
|