docusaurus-plugin-openapi-docs 0.0.0-730 → 0.0.0-733
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/lib/index.js +2 -0
- package/lib/openapi/openapi.js +2 -2
- package/lib/options.js +1 -0
- package/lib/types.d.ts +2 -1
- package/package.json +4 -4
- package/src/index.ts +2 -0
- package/src/openapi/openapi.ts +3 -3
- package/src/openapi-to-postmanv2.d.ts +1 -1
- package/src/options.ts +1 -0
- package/src/postman-collection.d.ts +1 -1
- package/src/types.ts +2 -1
package/lib/index.js
CHANGED
|
@@ -372,6 +372,7 @@ custom_edit_url: null
|
|
|
372
372
|
version: version,
|
|
373
373
|
label: metadata.label,
|
|
374
374
|
baseUrl: metadata.baseUrl,
|
|
375
|
+
downloadUrl: metadata.downloadUrl,
|
|
375
376
|
});
|
|
376
377
|
}
|
|
377
378
|
const versionsJson = JSON.stringify(versionsArray, null, 2);
|
|
@@ -491,6 +492,7 @@ custom_edit_url: null
|
|
|
491
492
|
delete parentConfig.version;
|
|
492
493
|
delete parentConfig.label;
|
|
493
494
|
delete parentConfig.baseUrl;
|
|
495
|
+
delete parentConfig.downloadUrl;
|
|
494
496
|
// TODO: handle when no versions are defined by version command is passed
|
|
495
497
|
if (versionId === "all") {
|
|
496
498
|
if (versions[id]) {
|
package/lib/openapi/openapi.js
CHANGED
|
@@ -12,14 +12,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.getTagDisplayName = exports.processOpenapiFile = exports.processOpenapiFiles = exports.readOpenapiFiles = void 0;
|
|
13
13
|
const path_1 = __importDefault(require("path"));
|
|
14
14
|
const utils_1 = require("@docusaurus/utils");
|
|
15
|
-
const openapi_to_postmanv2_1 = __importDefault(require("@paloaltonetworks/openapi-to-postmanv2"));
|
|
16
|
-
const postman_collection_1 = __importDefault(require("@paloaltonetworks/postman-collection"));
|
|
17
15
|
const chalk_1 = __importDefault(require("chalk"));
|
|
18
16
|
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
19
17
|
const cloneDeep_1 = __importDefault(require("lodash/cloneDeep"));
|
|
20
18
|
const kebabCase_1 = __importDefault(require("lodash/kebabCase"));
|
|
21
19
|
const unionBy_1 = __importDefault(require("lodash/unionBy"));
|
|
22
20
|
const uniq_1 = __importDefault(require("lodash/uniq"));
|
|
21
|
+
const openapi_to_postmanv2_1 = __importDefault(require("openapi-to-postmanv2"));
|
|
22
|
+
const postman_collection_1 = __importDefault(require("postman-collection"));
|
|
23
23
|
const createRequestExample_1 = require("./createRequestExample");
|
|
24
24
|
const loadAndResolveSpec_1 = require("./utils/loadAndResolveSpec");
|
|
25
25
|
const index_1 = require("../index");
|
package/lib/options.js
CHANGED
|
@@ -54,6 +54,7 @@ exports.OptionsSchema = utils_validation_1.Joi.object({
|
|
|
54
54
|
outputDir: utils_validation_1.Joi.string().required(),
|
|
55
55
|
label: utils_validation_1.Joi.string().required(),
|
|
56
56
|
baseUrl: utils_validation_1.Joi.string().required(),
|
|
57
|
+
downloadUrl: utils_validation_1.Joi.string(),
|
|
57
58
|
})),
|
|
58
59
|
}))
|
|
59
60
|
.required(),
|
package/lib/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type Request from "
|
|
1
|
+
import type Request from "postman-collection";
|
|
2
2
|
import { InfoObject, OperationObject, SchemaObject, SecuritySchemeObject, TagObject } from "./openapi/types";
|
|
3
3
|
export type { PropSidebarItemCategory, SidebarItemLink, PropSidebar, PropSidebarItem, } from "@docusaurus/plugin-content-docs-types";
|
|
4
4
|
export interface PluginOptions {
|
|
@@ -48,6 +48,7 @@ export interface APIVersionOptions {
|
|
|
48
48
|
outputDir: string;
|
|
49
49
|
label: string;
|
|
50
50
|
baseUrl: string;
|
|
51
|
+
downloadUrl?: string;
|
|
51
52
|
}
|
|
52
53
|
export interface LoadedContent {
|
|
53
54
|
loadedApi: ApiMetadata[];
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "docusaurus-plugin-openapi-docs",
|
|
3
3
|
"description": "OpenAPI plugin for Docusaurus.",
|
|
4
|
-
"version": "0.0.0-
|
|
4
|
+
"version": "0.0.0-733",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"openapi",
|
|
@@ -40,8 +40,6 @@
|
|
|
40
40
|
"@docusaurus/plugin-content-docs": ">=2.4.1 <=2.4.3",
|
|
41
41
|
"@docusaurus/utils": ">=2.4.1 <=2.4.3",
|
|
42
42
|
"@docusaurus/utils-validation": ">=2.4.1 <=2.4.3",
|
|
43
|
-
"@paloaltonetworks/openapi-to-postmanv2": "3.1.0-hotfix.1",
|
|
44
|
-
"@paloaltonetworks/postman-collection": "^4.1.0",
|
|
45
43
|
"@redocly/openapi-core": "^1.10.5",
|
|
46
44
|
"chalk": "^4.1.2",
|
|
47
45
|
"clsx": "^1.1.1",
|
|
@@ -50,6 +48,8 @@
|
|
|
50
48
|
"json-schema-merge-allof": "^0.8.1",
|
|
51
49
|
"lodash": "^4.17.20",
|
|
52
50
|
"mustache": "^4.2.0",
|
|
51
|
+
"openapi-to-postmanv2": "^4.21.0",
|
|
52
|
+
"postman-collection": "^4.4.0",
|
|
53
53
|
"slugify": "^1.6.5",
|
|
54
54
|
"swagger2openapi": "^7.0.8",
|
|
55
55
|
"xml-formatter": "^2.6.1"
|
|
@@ -60,5 +60,5 @@
|
|
|
60
60
|
"engines": {
|
|
61
61
|
"node": ">=14"
|
|
62
62
|
},
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "df9ca2a519f0b1ad22acc12dfe2b085ac4797b1d"
|
|
64
64
|
}
|
package/src/index.ts
CHANGED
|
@@ -532,6 +532,7 @@ custom_edit_url: null
|
|
|
532
532
|
version: version,
|
|
533
533
|
label: metadata.label,
|
|
534
534
|
baseUrl: metadata.baseUrl,
|
|
535
|
+
downloadUrl: metadata.downloadUrl,
|
|
535
536
|
});
|
|
536
537
|
}
|
|
537
538
|
|
|
@@ -682,6 +683,7 @@ custom_edit_url: null
|
|
|
682
683
|
delete parentConfig.version;
|
|
683
684
|
delete parentConfig.label;
|
|
684
685
|
delete parentConfig.baseUrl;
|
|
686
|
+
delete parentConfig.downloadUrl;
|
|
685
687
|
|
|
686
688
|
// TODO: handle when no versions are defined by version command is passed
|
|
687
689
|
if (versionId === "all") {
|
package/src/openapi/openapi.ts
CHANGED
|
@@ -8,15 +8,15 @@
|
|
|
8
8
|
import path from "path";
|
|
9
9
|
|
|
10
10
|
import { Globby, GlobExcludeDefault, posixPath } from "@docusaurus/utils";
|
|
11
|
-
import Converter from "@paloaltonetworks/openapi-to-postmanv2";
|
|
12
|
-
import sdk from "@paloaltonetworks/postman-collection";
|
|
13
|
-
import Collection from "@paloaltonetworks/postman-collection";
|
|
14
11
|
import chalk from "chalk";
|
|
15
12
|
import fs from "fs-extra";
|
|
16
13
|
import cloneDeep from "lodash/cloneDeep";
|
|
17
14
|
import kebabCase from "lodash/kebabCase";
|
|
18
15
|
import unionBy from "lodash/unionBy";
|
|
19
16
|
import uniq from "lodash/uniq";
|
|
17
|
+
import Converter from "openapi-to-postmanv2";
|
|
18
|
+
import Collection from "postman-collection";
|
|
19
|
+
import sdk from "postman-collection";
|
|
20
20
|
|
|
21
21
|
import { sampleRequestFromSchema } from "./createRequestExample";
|
|
22
22
|
import { OpenApiObject, TagGroupObject, TagObject } from "./types";
|
|
@@ -5,6 +5,6 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
* ========================================================================== */
|
|
7
7
|
|
|
8
|
-
declare module "
|
|
8
|
+
declare module "openapi-to-postmanv2" {
|
|
9
9
|
export default any;
|
|
10
10
|
}
|
package/src/options.ts
CHANGED
package/src/types.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
* ========================================================================== */
|
|
7
7
|
|
|
8
|
-
import type Request from "
|
|
8
|
+
import type Request from "postman-collection";
|
|
9
9
|
|
|
10
10
|
import {
|
|
11
11
|
InfoObject,
|
|
@@ -70,6 +70,7 @@ export interface APIVersionOptions {
|
|
|
70
70
|
outputDir: string;
|
|
71
71
|
label: string;
|
|
72
72
|
baseUrl: string;
|
|
73
|
+
downloadUrl?: string;
|
|
73
74
|
}
|
|
74
75
|
|
|
75
76
|
export interface LoadedContent {
|