@scalar/postman-to-openapi 0.1.0
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 +12 -0
- package/README.md +33 -0
- package/dist/convert.d.ts +9 -0
- package/dist/convert.d.ts.map +1 -0
- package/dist/convert.js +156 -0
- package/dist/helpers/authHelpers.d.ts +12 -0
- package/dist/helpers/authHelpers.d.ts.map +1 -0
- package/dist/helpers/authHelpers.js +99 -0
- package/dist/helpers/externalDocsHelper.d.ts +10 -0
- package/dist/helpers/externalDocsHelper.d.ts.map +1 -0
- package/dist/helpers/externalDocsHelper.js +40 -0
- package/dist/helpers/formDataHelpers.d.ts +8 -0
- package/dist/helpers/formDataHelpers.d.ts.map +1 -0
- package/dist/helpers/formDataHelpers.js +42 -0
- package/dist/helpers/itemHelpers.d.ts +13 -0
- package/dist/helpers/itemHelpers.d.ts.map +1 -0
- package/dist/helpers/itemHelpers.js +236 -0
- package/dist/helpers/licenseContactHelper.d.ts +14 -0
- package/dist/helpers/licenseContactHelper.d.ts.map +1 -0
- package/dist/helpers/licenseContactHelper.js +73 -0
- package/dist/helpers/logoHelper.d.ts +13 -0
- package/dist/helpers/logoHelper.d.ts.map +1 -0
- package/dist/helpers/logoHelper.js +24 -0
- package/dist/helpers/md-utils.d.ts +6 -0
- package/dist/helpers/md-utils.d.ts.map +1 -0
- package/dist/helpers/md-utils.js +40 -0
- package/dist/helpers/parameterHelpers.d.ts +12 -0
- package/dist/helpers/parameterHelpers.d.ts.map +1 -0
- package/dist/helpers/parameterHelpers.js +109 -0
- package/dist/helpers/requestBodyHelpers.d.ts +8 -0
- package/dist/helpers/requestBodyHelpers.d.ts.map +1 -0
- package/dist/helpers/requestBodyHelpers.js +79 -0
- package/dist/helpers/responseHelpers.d.ts +9 -0
- package/dist/helpers/responseHelpers.d.ts.map +1 -0
- package/dist/helpers/responseHelpers.js +52 -0
- package/dist/helpers/schemaHelpers.d.ts +15 -0
- package/dist/helpers/schemaHelpers.d.ts.map +1 -0
- package/dist/helpers/schemaHelpers.js +52 -0
- package/dist/helpers/serverHelpers.d.ts +9 -0
- package/dist/helpers/serverHelpers.d.ts.map +1 -0
- package/dist/helpers/serverHelpers.js +29 -0
- package/dist/helpers/statusCodeHelpers.d.ts +10 -0
- package/dist/helpers/statusCodeHelpers.d.ts.map +1 -0
- package/dist/helpers/statusCodeHelpers.js +47 -0
- package/dist/helpers/urlHelpers.d.ts +19 -0
- package/dist/helpers/urlHelpers.d.ts.map +1 -0
- package/dist/helpers/urlHelpers.js +52 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -0
- package/dist/types.d.ts +229 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +1 -0
- package/package.json +58 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { inferSchemaFromExample } from './schemaHelpers.js';
|
|
2
|
+
/**
|
|
3
|
+
* Extracts and converts Postman response objects to OpenAPI response objects.
|
|
4
|
+
* Processes response status codes, descriptions, headers, and body content,
|
|
5
|
+
* inferring schemas from example responses when possible.
|
|
6
|
+
*/
|
|
7
|
+
export function extractResponses(responses) {
|
|
8
|
+
if (!responses || !Array.isArray(responses) || responses.length === 0) {
|
|
9
|
+
return { '200': { description: 'OK' } };
|
|
10
|
+
}
|
|
11
|
+
return responses.reduce((openapiResponses, response) => {
|
|
12
|
+
const statusCode = response.code?.toString() || 'default';
|
|
13
|
+
openapiResponses[statusCode] = {
|
|
14
|
+
description: response.status || '',
|
|
15
|
+
headers: extractHeaders(response.header),
|
|
16
|
+
content: {
|
|
17
|
+
'application/json': {
|
|
18
|
+
schema: inferSchemaFromExample(response.body || ''),
|
|
19
|
+
examples: {
|
|
20
|
+
default: tryParseJson(response.body || ''),
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
return openapiResponses;
|
|
26
|
+
}, {});
|
|
27
|
+
}
|
|
28
|
+
function extractHeaders(headers) {
|
|
29
|
+
if (!headers || typeof headers === 'string') {
|
|
30
|
+
return undefined;
|
|
31
|
+
}
|
|
32
|
+
const openapiHeaders = {};
|
|
33
|
+
if (Array.isArray(headers)) {
|
|
34
|
+
headers.forEach((header) => {
|
|
35
|
+
openapiHeaders[header.key] = {
|
|
36
|
+
schema: {
|
|
37
|
+
type: 'string',
|
|
38
|
+
examples: [header.value],
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
return openapiHeaders;
|
|
44
|
+
}
|
|
45
|
+
function tryParseJson(jsonString) {
|
|
46
|
+
try {
|
|
47
|
+
return JSON.parse(jsonString);
|
|
48
|
+
}
|
|
49
|
+
catch (e) {
|
|
50
|
+
return { rawContent: jsonString };
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { OpenAPIV3_1 } from '@scalar/openapi-types';
|
|
2
|
+
/**
|
|
3
|
+
* Infers the schema of an OpenAPI object based on an example value.
|
|
4
|
+
* This function recursively analyzes the structure of the example value
|
|
5
|
+
* and returns a corresponding OpenAPI schema object.
|
|
6
|
+
*/
|
|
7
|
+
export declare function inferSchemaFromExample(example: any): OpenAPIV3_1.SchemaObject;
|
|
8
|
+
/**
|
|
9
|
+
* Infers the schema type of a value based on its type.
|
|
10
|
+
* This function determines the OpenAPI schema type of a value
|
|
11
|
+
* by checking its JavaScript type and attempting to parse it
|
|
12
|
+
* as a number or boolean if it's a string.
|
|
13
|
+
*/
|
|
14
|
+
export declare function inferSchemaType(value: any): OpenAPIV3_1.SchemaObject;
|
|
15
|
+
//# sourceMappingURL=schemaHelpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemaHelpers.d.ts","sourceRoot":"","sources":["../../src/helpers/schemaHelpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAExD;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,GAAG,GAAG,WAAW,CAAC,YAAY,CAoB7E;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,GAAG,GAAG,WAAW,CAAC,YAAY,CAepE"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Infers the schema of an OpenAPI object based on an example value.
|
|
3
|
+
* This function recursively analyzes the structure of the example value
|
|
4
|
+
* and returns a corresponding OpenAPI schema object.
|
|
5
|
+
*/
|
|
6
|
+
export function inferSchemaFromExample(example) {
|
|
7
|
+
if (Array.isArray(example)) {
|
|
8
|
+
return {
|
|
9
|
+
type: 'array',
|
|
10
|
+
items: example.length > 0 ? inferSchemaFromExample(example[0]) : {},
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
else if (typeof example === 'object' && example !== null) {
|
|
14
|
+
const properties = {};
|
|
15
|
+
for (const [key, value] of Object.entries(example)) {
|
|
16
|
+
properties[key] = inferSchemaFromExample(value);
|
|
17
|
+
}
|
|
18
|
+
return {
|
|
19
|
+
type: 'object',
|
|
20
|
+
properties,
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
return {
|
|
25
|
+
type: typeof example,
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Infers the schema type of a value based on its type.
|
|
31
|
+
* This function determines the OpenAPI schema type of a value
|
|
32
|
+
* by checking its JavaScript type and attempting to parse it
|
|
33
|
+
* as a number or boolean if it's a string.
|
|
34
|
+
*/
|
|
35
|
+
export function inferSchemaType(value) {
|
|
36
|
+
if (typeof value === 'number') {
|
|
37
|
+
return { type: Number.isInteger(value) ? 'integer' : 'number' };
|
|
38
|
+
}
|
|
39
|
+
else if (typeof value === 'boolean') {
|
|
40
|
+
return { type: 'boolean' };
|
|
41
|
+
}
|
|
42
|
+
else if (typeof value === 'string') {
|
|
43
|
+
const num = Number(value);
|
|
44
|
+
if (!isNaN(num)) {
|
|
45
|
+
return { type: Number.isInteger(num) ? 'integer' : 'number' };
|
|
46
|
+
}
|
|
47
|
+
if (value.toLowerCase() === 'true' || value.toLowerCase() === 'false') {
|
|
48
|
+
return { type: 'boolean' };
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return { type: 'string' };
|
|
52
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { OpenAPIV3_1 } from '@scalar/openapi-types';
|
|
2
|
+
import type { PostmanCollection } from '../types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Parses a Postman collection to extract unique server URLs.
|
|
5
|
+
* Iterates through collection items, extracts domains from request URLs,
|
|
6
|
+
* and returns an array of unique server objects for the OpenAPI specification.
|
|
7
|
+
*/
|
|
8
|
+
export declare function parseServers(postmanCollection: PostmanCollection): OpenAPIV3_1.ServerObject[];
|
|
9
|
+
//# sourceMappingURL=serverHelpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serverHelpers.d.ts","sourceRoot":"","sources":["../../src/helpers/serverHelpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAExD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AAGjD;;;;GAIG;AACH,wBAAgB,YAAY,CAC1B,iBAAiB,EAAE,iBAAiB,GACnC,WAAW,CAAC,YAAY,EAAE,CAyB5B"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { getDomainFromUrl } from './urlHelpers.js';
|
|
2
|
+
/**
|
|
3
|
+
* Parses a Postman collection to extract unique server URLs.
|
|
4
|
+
* Iterates through collection items, extracts domains from request URLs,
|
|
5
|
+
* and returns an array of unique server objects for the OpenAPI specification.
|
|
6
|
+
*/
|
|
7
|
+
export function parseServers(postmanCollection) {
|
|
8
|
+
// Set to store unique domains
|
|
9
|
+
const domains = new Set();
|
|
10
|
+
if (postmanCollection.item && Array.isArray(postmanCollection.item)) {
|
|
11
|
+
postmanCollection.item.forEach((item) => {
|
|
12
|
+
if ('request' in item && typeof item.request !== 'string') {
|
|
13
|
+
const url = typeof item.request.url === 'string'
|
|
14
|
+
? item.request.url
|
|
15
|
+
: item.request.url?.raw;
|
|
16
|
+
if (url) {
|
|
17
|
+
try {
|
|
18
|
+
const domain = getDomainFromUrl(url);
|
|
19
|
+
domains.add(domain);
|
|
20
|
+
}
|
|
21
|
+
catch (error) {
|
|
22
|
+
console.error(`Error extracting domain from URL "${url}":`, error);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
return Array.from(domains).map((domain) => ({ url: domain }));
|
|
29
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Item } from '../types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Extracts expected status codes from the test scripts of a Postman item.
|
|
4
|
+
* Looks for patterns like:
|
|
5
|
+
* - pm.response.to.have.status(201)
|
|
6
|
+
* - pm.expect(pm.response.code).to.eql(202)
|
|
7
|
+
* - pm.expect(pm.response.status).to.equal(201)
|
|
8
|
+
*/
|
|
9
|
+
export declare function extractStatusCodesFromTests(item: Item): number[];
|
|
10
|
+
//# sourceMappingURL=statusCodeHelpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"statusCodeHelpers.d.ts","sourceRoot":"","sources":["../../src/helpers/statusCodeHelpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAEpC;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,EAAE,CAqBhE"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Extracts expected status codes from the test scripts of a Postman item.
|
|
3
|
+
* Looks for patterns like:
|
|
4
|
+
* - pm.response.to.have.status(201)
|
|
5
|
+
* - pm.expect(pm.response.code).to.eql(202)
|
|
6
|
+
* - pm.expect(pm.response.status).to.equal(201)
|
|
7
|
+
*/
|
|
8
|
+
export function extractStatusCodesFromTests(item) {
|
|
9
|
+
const statusCodes = [];
|
|
10
|
+
if (item.event?.length) {
|
|
11
|
+
item.event.forEach((event) => {
|
|
12
|
+
if (event.listen === 'test' && event.script?.exec) {
|
|
13
|
+
const scriptLines = Array.isArray(event.script.exec)
|
|
14
|
+
? event.script.exec
|
|
15
|
+
: [event.script.exec];
|
|
16
|
+
scriptLines.forEach((line) => {
|
|
17
|
+
const statusCode = parseStatusCodeFromLine(line);
|
|
18
|
+
if (statusCode) {
|
|
19
|
+
statusCodes.push(statusCode);
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
return statusCodes;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Parses a line of script to extract a status code.
|
|
29
|
+
* Supports patterns like:
|
|
30
|
+
* - pm.response.to.have.status(201)
|
|
31
|
+
* - pm.expect(pm.response.code).to.eql(202)
|
|
32
|
+
* - pm.expect(pm.response.status).to.equal(201)
|
|
33
|
+
*/
|
|
34
|
+
function parseStatusCodeFromLine(line) {
|
|
35
|
+
const patterns = [
|
|
36
|
+
/pm\.response\.to\.have\.status\((\d{3})\)/,
|
|
37
|
+
/pm\.expect\(pm\.response\.code\)\.to\.(?:eql|equal)\((\d{3})\)/,
|
|
38
|
+
/pm\.expect\(pm\.response\.status\)\.to\.(?:eql|equal)\(['"](\d{3})['"]\)/,
|
|
39
|
+
];
|
|
40
|
+
for (const pattern of patterns) {
|
|
41
|
+
const match = pattern.exec(line)?.at(1);
|
|
42
|
+
if (match) {
|
|
43
|
+
return parseInt(match, 10);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Extracts the domain (including protocol and port if present) from a given URL.
|
|
3
|
+
*/
|
|
4
|
+
export declare function getDomainFromUrl(url: string): string;
|
|
5
|
+
/**
|
|
6
|
+
* Extracts the path from a given URL, removing any Postman variables.
|
|
7
|
+
*/
|
|
8
|
+
export declare function extractPathFromUrl(url: string | undefined): string;
|
|
9
|
+
/**
|
|
10
|
+
* Normalizes a path by converting colon-style parameters to curly brace style
|
|
11
|
+
* e.g., '/users/:id' becomes '/users/{id}'
|
|
12
|
+
*/
|
|
13
|
+
export declare const normalizePath: (path: string) => string;
|
|
14
|
+
/**
|
|
15
|
+
* Extracts parameter names from a path string.
|
|
16
|
+
* Handles double curly braces {{param}}, single curly braces {param}, and colon format :param.
|
|
17
|
+
*/
|
|
18
|
+
export declare function extractPathParameterNames(path: string): string[];
|
|
19
|
+
//# sourceMappingURL=urlHelpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"urlHelpers.d.ts","sourceRoot":"","sources":["../../src/helpers/urlHelpers.ts"],"names":[],"mappings":"AAgBA;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAGpD;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAYlE;AAED;;;GAGG;AACH,eAAO,MAAM,aAAa,SAAU,MAAM,KAAG,MACZ,CAAA;AAEjC;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAahE"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { REGEX } from '@scalar/oas-utils/helpers';
|
|
2
|
+
/**
|
|
3
|
+
* Parses a URL string into its component parts.
|
|
4
|
+
*/
|
|
5
|
+
function parseUrl(urlString) {
|
|
6
|
+
const url = new URL(urlString);
|
|
7
|
+
return {
|
|
8
|
+
protocol: url.protocol,
|
|
9
|
+
hostname: url.hostname,
|
|
10
|
+
port: url.port,
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Extracts the domain (including protocol and port if present) from a given URL.
|
|
15
|
+
*/
|
|
16
|
+
export function getDomainFromUrl(url) {
|
|
17
|
+
const { protocol, hostname, port } = parseUrl(url);
|
|
18
|
+
return `${protocol}//${hostname}${port ? `:${port}` : ''}`;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Extracts the path from a given URL, removing any Postman variables.
|
|
22
|
+
*/
|
|
23
|
+
export function extractPathFromUrl(url) {
|
|
24
|
+
if (!url)
|
|
25
|
+
return '/';
|
|
26
|
+
// Remove scheme, domain, query parameters, and hash fragments
|
|
27
|
+
const path = url.replace(/^(?:https?:\/\/)?[^/]+(\/|$)/, '/').split(/[?#]/)[0];
|
|
28
|
+
// Replace Postman variables and ensure single leading slash
|
|
29
|
+
const finalPath = ('/' + path.replace(/\{\{([^{}]{0,1000})\}\}/g, '{$1}').replace(/^\/+/, '')).replace(/\/\/+/g, '/');
|
|
30
|
+
return finalPath;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Normalizes a path by converting colon-style parameters to curly brace style
|
|
34
|
+
* e.g., '/users/:id' becomes '/users/{id}'
|
|
35
|
+
*/
|
|
36
|
+
export const normalizePath = (path) => path.replace(/:(\w+)/g, '{$1}');
|
|
37
|
+
/**
|
|
38
|
+
* Extracts parameter names from a path string.
|
|
39
|
+
* Handles double curly braces {{param}}, single curly braces {param}, and colon format :param.
|
|
40
|
+
*/
|
|
41
|
+
export function extractPathParameterNames(path) {
|
|
42
|
+
const params = new Set();
|
|
43
|
+
let match;
|
|
44
|
+
while ((match = REGEX.TEMPLATE_VARIABLE.exec(path)) !== null) {
|
|
45
|
+
// match[1] contains the parameter name from {{param}}
|
|
46
|
+
// match[2] contains the parameter name from {param}
|
|
47
|
+
// match[0].slice(1) gets the parameter name from :param
|
|
48
|
+
const param = match[1] || match[2] || match[0].slice(1);
|
|
49
|
+
params.add(param.trim());
|
|
50
|
+
}
|
|
51
|
+
return Array.from(params);
|
|
52
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAEnC,OAAO,EAAE,OAAO,EAAE,CAAA"}
|
package/dist/index.js
ADDED
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
export type PostmanCollection = {
|
|
2
|
+
info: Info;
|
|
3
|
+
item: (Item | ItemGroup)[];
|
|
4
|
+
event?: Event[];
|
|
5
|
+
variable?: Variable[];
|
|
6
|
+
auth?: Auth | null;
|
|
7
|
+
protocolProfileBehavior?: ProtocolProfileBehavior;
|
|
8
|
+
};
|
|
9
|
+
export type Info = {
|
|
10
|
+
name: string;
|
|
11
|
+
_postman_id?: string;
|
|
12
|
+
description?: Description;
|
|
13
|
+
version?: Version;
|
|
14
|
+
schema: string;
|
|
15
|
+
};
|
|
16
|
+
export type Description = string | {
|
|
17
|
+
content?: string;
|
|
18
|
+
type?: string;
|
|
19
|
+
version?: string | number;
|
|
20
|
+
};
|
|
21
|
+
export type Version = string | {
|
|
22
|
+
major: number;
|
|
23
|
+
minor: number;
|
|
24
|
+
patch: number;
|
|
25
|
+
identifier?: string;
|
|
26
|
+
meta?: Record<string, string | number | boolean>;
|
|
27
|
+
};
|
|
28
|
+
export type Item = {
|
|
29
|
+
id?: string;
|
|
30
|
+
name?: string;
|
|
31
|
+
description?: Description;
|
|
32
|
+
variable?: Variable[];
|
|
33
|
+
event?: Event[];
|
|
34
|
+
request: Request;
|
|
35
|
+
response?: Response[];
|
|
36
|
+
protocolProfileBehavior?: ProtocolProfileBehavior;
|
|
37
|
+
};
|
|
38
|
+
export type ItemGroup = {
|
|
39
|
+
name?: string;
|
|
40
|
+
description?: Description;
|
|
41
|
+
variable?: Variable[];
|
|
42
|
+
item: (Item | ItemGroup)[];
|
|
43
|
+
event?: Event[];
|
|
44
|
+
auth?: Auth | null;
|
|
45
|
+
protocolProfileBehavior?: ProtocolProfileBehavior;
|
|
46
|
+
};
|
|
47
|
+
export type Event = {
|
|
48
|
+
id?: string;
|
|
49
|
+
listen: string;
|
|
50
|
+
script: Script;
|
|
51
|
+
disabled?: boolean;
|
|
52
|
+
};
|
|
53
|
+
export type Script = {
|
|
54
|
+
id?: string;
|
|
55
|
+
type?: string;
|
|
56
|
+
exec?: string[] | string;
|
|
57
|
+
src?: Url;
|
|
58
|
+
name?: string;
|
|
59
|
+
};
|
|
60
|
+
export type Url = string | {
|
|
61
|
+
raw?: string;
|
|
62
|
+
protocol?: string;
|
|
63
|
+
host?: string | string[];
|
|
64
|
+
path?: string | (string | {
|
|
65
|
+
type: string;
|
|
66
|
+
value: string;
|
|
67
|
+
})[];
|
|
68
|
+
port?: string;
|
|
69
|
+
query?: QueryParam[];
|
|
70
|
+
hash?: string;
|
|
71
|
+
variable?: Variable[];
|
|
72
|
+
};
|
|
73
|
+
export type QueryParam = {
|
|
74
|
+
key: string | null;
|
|
75
|
+
value: string | null;
|
|
76
|
+
disabled?: boolean;
|
|
77
|
+
description?: Description;
|
|
78
|
+
};
|
|
79
|
+
export type Variable = {
|
|
80
|
+
id?: string;
|
|
81
|
+
key?: string;
|
|
82
|
+
value?: string | number | boolean | null;
|
|
83
|
+
type?: 'string' | 'boolean' | 'any' | 'number';
|
|
84
|
+
name?: string;
|
|
85
|
+
description?: Description;
|
|
86
|
+
system?: boolean;
|
|
87
|
+
disabled?: boolean;
|
|
88
|
+
};
|
|
89
|
+
export type Auth = {
|
|
90
|
+
type: string;
|
|
91
|
+
noauth?: null;
|
|
92
|
+
apikey?: AuthAttribute[];
|
|
93
|
+
awsv4?: AuthAttribute[];
|
|
94
|
+
basic?: AuthAttribute[];
|
|
95
|
+
bearer?: AuthAttribute[];
|
|
96
|
+
digest?: AuthAttribute[];
|
|
97
|
+
edgegrid?: AuthAttribute[];
|
|
98
|
+
hawk?: AuthAttribute[];
|
|
99
|
+
ntlm?: AuthAttribute[];
|
|
100
|
+
oauth1?: AuthAttribute[];
|
|
101
|
+
oauth2?: AuthAttribute[];
|
|
102
|
+
};
|
|
103
|
+
export type AuthAttribute = {
|
|
104
|
+
key: string;
|
|
105
|
+
value?: string | number | boolean;
|
|
106
|
+
type?: string;
|
|
107
|
+
};
|
|
108
|
+
export type Request = string | {
|
|
109
|
+
url?: Url;
|
|
110
|
+
auth?: Auth | null;
|
|
111
|
+
proxy?: ProxyConfig;
|
|
112
|
+
certificate?: Certificate;
|
|
113
|
+
method?: string;
|
|
114
|
+
description?: Description;
|
|
115
|
+
header?: HeaderList | string;
|
|
116
|
+
body?: RequestBody | null;
|
|
117
|
+
};
|
|
118
|
+
export type ProxyConfig = {
|
|
119
|
+
match?: string;
|
|
120
|
+
host?: string;
|
|
121
|
+
port?: number;
|
|
122
|
+
tunnel?: boolean;
|
|
123
|
+
disabled?: boolean;
|
|
124
|
+
};
|
|
125
|
+
export type Certificate = {
|
|
126
|
+
name?: string;
|
|
127
|
+
matches?: string[];
|
|
128
|
+
key?: {
|
|
129
|
+
src?: string;
|
|
130
|
+
};
|
|
131
|
+
cert?: {
|
|
132
|
+
src?: string;
|
|
133
|
+
};
|
|
134
|
+
passphrase?: string;
|
|
135
|
+
};
|
|
136
|
+
export type HeaderList = Header[];
|
|
137
|
+
export type Header = {
|
|
138
|
+
key: string;
|
|
139
|
+
value: string;
|
|
140
|
+
disabled?: boolean;
|
|
141
|
+
description?: Description;
|
|
142
|
+
};
|
|
143
|
+
export type RequestBody = {
|
|
144
|
+
mode?: 'raw' | 'urlencoded' | 'formdata' | 'file' | 'graphql';
|
|
145
|
+
raw?: string;
|
|
146
|
+
graphql?: {
|
|
147
|
+
query?: string;
|
|
148
|
+
variables?: Record<string, string | number | boolean | null>;
|
|
149
|
+
};
|
|
150
|
+
urlencoded?: UrlEncodedParameter[];
|
|
151
|
+
formdata?: FormParameter[];
|
|
152
|
+
file?: {
|
|
153
|
+
src?: string | null;
|
|
154
|
+
content?: string;
|
|
155
|
+
};
|
|
156
|
+
options?: {
|
|
157
|
+
raw?: {
|
|
158
|
+
language?: string;
|
|
159
|
+
};
|
|
160
|
+
urlencoded?: {
|
|
161
|
+
contentType?: string;
|
|
162
|
+
};
|
|
163
|
+
formdata?: {
|
|
164
|
+
contentType?: string;
|
|
165
|
+
};
|
|
166
|
+
};
|
|
167
|
+
disabled?: boolean;
|
|
168
|
+
};
|
|
169
|
+
export type UrlEncodedParameter = {
|
|
170
|
+
key: string;
|
|
171
|
+
value?: string;
|
|
172
|
+
disabled?: boolean;
|
|
173
|
+
description?: Description;
|
|
174
|
+
};
|
|
175
|
+
export type FormParameter = {
|
|
176
|
+
key: string;
|
|
177
|
+
value?: string;
|
|
178
|
+
disabled?: boolean;
|
|
179
|
+
type: 'text';
|
|
180
|
+
contentType?: string;
|
|
181
|
+
description?: Description;
|
|
182
|
+
} | {
|
|
183
|
+
key: string;
|
|
184
|
+
src?: string[] | string | null;
|
|
185
|
+
disabled?: boolean;
|
|
186
|
+
type: 'file';
|
|
187
|
+
contentType?: string;
|
|
188
|
+
description?: Description;
|
|
189
|
+
};
|
|
190
|
+
export type Response = {
|
|
191
|
+
id?: string;
|
|
192
|
+
originalRequest?: Request;
|
|
193
|
+
responseTime?: string | number | null;
|
|
194
|
+
timings?: object | null;
|
|
195
|
+
header?: HeaderList | string | null;
|
|
196
|
+
cookie?: Cookie[];
|
|
197
|
+
body?: string | null;
|
|
198
|
+
status?: string;
|
|
199
|
+
code?: number;
|
|
200
|
+
};
|
|
201
|
+
export type Cookie = {
|
|
202
|
+
domain: string;
|
|
203
|
+
expires?: string | null;
|
|
204
|
+
maxAge?: string;
|
|
205
|
+
hostOnly?: boolean;
|
|
206
|
+
httpOnly?: boolean;
|
|
207
|
+
name?: string;
|
|
208
|
+
path: string;
|
|
209
|
+
secure?: boolean;
|
|
210
|
+
session?: boolean;
|
|
211
|
+
value?: string;
|
|
212
|
+
extensions?: Array<{
|
|
213
|
+
key: string;
|
|
214
|
+
value: string;
|
|
215
|
+
}>;
|
|
216
|
+
};
|
|
217
|
+
export type ParsedUrl = {
|
|
218
|
+
protocol: string;
|
|
219
|
+
hostname: string;
|
|
220
|
+
port: string;
|
|
221
|
+
};
|
|
222
|
+
export type TableCell = {
|
|
223
|
+
[key: string]: string;
|
|
224
|
+
};
|
|
225
|
+
export type TableObject = {
|
|
226
|
+
[key: string]: TableCell;
|
|
227
|
+
};
|
|
228
|
+
export type ProtocolProfileBehavior = {};
|
|
229
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,IAAI,CAAA;IACV,IAAI,EAAE,CAAC,IAAI,GAAG,SAAS,CAAC,EAAE,CAAA;IAC1B,KAAK,CAAC,EAAE,KAAK,EAAE,CAAA;IACf,QAAQ,CAAC,EAAE,QAAQ,EAAE,CAAA;IACrB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAA;IAClB,uBAAuB,CAAC,EAAE,uBAAuB,CAAA;CAClD,CAAA;AAED,MAAM,MAAM,IAAI,GAAG;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,WAAW,CAAA;IACzB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AAED,MAAM,MAAM,WAAW,GACnB,MAAM,GACN;IACE,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CAC1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M,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAED,MAAM,MAAM,MAAM,GAAG;IACnB,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,UAAU,CAAC,EAAE,KAAK,CAAC;QACjB,GAAG,EAAE,MAAM,CAAA;QACX,KAAK,EAAE,MAAM,CAAA;KACd,CAAC,CAAA;CACH,CAAA;AAED,MAAM,MAAM,SAAS,GAAG;IACtB,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED,MAAM,MAAM,SAAS,GAAG;IACtB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CACtB,CAAA;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAA;CACzB,CAAA;AAED,MAAM,MAAM,uBAAuB,GAAG,EAErC,CAAA"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@scalar/postman-to-openapi",
|
|
3
|
+
"description": "Converts Postman collections to OpenAPI documents",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"author": "Scalar (https://github.com/scalar)",
|
|
6
|
+
"homepage": "https://github.com/scalar/scalar",
|
|
7
|
+
"bugs": "https://github.com/scalar/scalar/issues/new/choose",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/scalar/scalar.git",
|
|
11
|
+
"directory": "packages/postman-to-openapi"
|
|
12
|
+
},
|
|
13
|
+
"keywords": [
|
|
14
|
+
"postman",
|
|
15
|
+
"openapi",
|
|
16
|
+
"swagger",
|
|
17
|
+
"converter",
|
|
18
|
+
"transformer",
|
|
19
|
+
"export",
|
|
20
|
+
"scalar"
|
|
21
|
+
],
|
|
22
|
+
"version": "0.1.0",
|
|
23
|
+
"engines": {
|
|
24
|
+
"node": ">=18"
|
|
25
|
+
},
|
|
26
|
+
"type": "module",
|
|
27
|
+
"main": "dist/index.js",
|
|
28
|
+
"exports": {
|
|
29
|
+
".": {
|
|
30
|
+
"import": "./dist/index.js",
|
|
31
|
+
"types": "./dist/index.d.ts",
|
|
32
|
+
"default": "./dist/index.js"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"files": [
|
|
36
|
+
"dist",
|
|
37
|
+
"CHANGELOG.md"
|
|
38
|
+
],
|
|
39
|
+
"module": "dist/index.js",
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"@scalar/openapi-types": "0.1.5",
|
|
42
|
+
"@scalar/oas-utils": "0.2.77"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"vite": "^5.2.10",
|
|
46
|
+
"@scalar/build-tooling": "0.1.12"
|
|
47
|
+
},
|
|
48
|
+
"scripts": {
|
|
49
|
+
"build": "scalar-build-rollup",
|
|
50
|
+
"format": "scalar-format-js",
|
|
51
|
+
"lint:check": "eslint .",
|
|
52
|
+
"lint:fix": "eslint . --fix",
|
|
53
|
+
"test": "vitest",
|
|
54
|
+
"types:build": "scalar-types-build",
|
|
55
|
+
"types:check": "scalar-types-check",
|
|
56
|
+
"watch": "scalar-build-rollup -w"
|
|
57
|
+
}
|
|
58
|
+
}
|