docusaurus-plugin-openapi-docs 0.0.0-1016 → 0.0.0-1017
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/openapi/openapi.js +35 -2
- package/lib/types.d.ts +0 -1
- package/package.json +2 -2
- package/src/openapi/openapi.ts +2 -2
- package/src/types.ts +1 -1
- package/src/postman-collection.d.ts +0 -10
package/lib/openapi/openapi.js
CHANGED
|
@@ -5,6 +5,39 @@
|
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
* ========================================================================== */
|
|
8
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
9
|
+
if (k2 === undefined) k2 = k;
|
|
10
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
11
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
12
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
13
|
+
}
|
|
14
|
+
Object.defineProperty(o, k2, desc);
|
|
15
|
+
}) : (function(o, m, k, k2) {
|
|
16
|
+
if (k2 === undefined) k2 = k;
|
|
17
|
+
o[k2] = m[k];
|
|
18
|
+
}));
|
|
19
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
20
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
21
|
+
}) : function(o, v) {
|
|
22
|
+
o["default"] = v;
|
|
23
|
+
});
|
|
24
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
25
|
+
var ownKeys = function(o) {
|
|
26
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
27
|
+
var ar = [];
|
|
28
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
29
|
+
return ar;
|
|
30
|
+
};
|
|
31
|
+
return ownKeys(o);
|
|
32
|
+
};
|
|
33
|
+
return function (mod) {
|
|
34
|
+
if (mod && mod.__esModule) return mod;
|
|
35
|
+
var result = {};
|
|
36
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
37
|
+
__setModuleDefault(result, mod);
|
|
38
|
+
return result;
|
|
39
|
+
};
|
|
40
|
+
})();
|
|
8
41
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
9
42
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10
43
|
};
|
|
@@ -22,7 +55,7 @@ const kebabCase_1 = __importDefault(require("lodash/kebabCase"));
|
|
|
22
55
|
const unionBy_1 = __importDefault(require("lodash/unionBy"));
|
|
23
56
|
const uniq_1 = __importDefault(require("lodash/uniq"));
|
|
24
57
|
const openapi_to_postmanv2_1 = __importDefault(require("openapi-to-postmanv2"));
|
|
25
|
-
const
|
|
58
|
+
const sdk = __importStar(require("postman-collection"));
|
|
26
59
|
const createRequestExample_1 = require("./createRequestExample");
|
|
27
60
|
const index_1 = require("../index");
|
|
28
61
|
const createResponseExample_1 = require("./createResponseExample");
|
|
@@ -38,7 +71,7 @@ function jsonToCollection(data) {
|
|
|
38
71
|
if (!conversionResult.result) {
|
|
39
72
|
return reject(conversionResult.reason);
|
|
40
73
|
}
|
|
41
|
-
return resolve(new
|
|
74
|
+
return resolve(new sdk.Collection(conversionResult.output[0].data));
|
|
42
75
|
});
|
|
43
76
|
});
|
|
44
77
|
}
|
package/lib/types.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { SidebarItemDoc } from "@docusaurus/plugin-content-docs/src/sidebars/types";
|
|
2
|
-
import type Request from "postman-collection";
|
|
3
2
|
import { InfoObject, OperationObject, SchemaObject, SecuritySchemeObject, TagObject } from "./openapi/types";
|
|
4
3
|
export type { PropSidebarItemCategory, SidebarItemLink, PropSidebar, PropSidebarItem, } from "@docusaurus/plugin-content-docs-types";
|
|
5
4
|
export interface PluginOptions {
|
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-1017",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"openapi",
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"engines": {
|
|
66
66
|
"node": ">=14"
|
|
67
67
|
},
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "b61e72b970c9ae9877e8da8590e463e568da66e8"
|
|
69
69
|
}
|
package/src/openapi/openapi.ts
CHANGED
|
@@ -15,8 +15,8 @@ import kebabCase from "lodash/kebabCase";
|
|
|
15
15
|
import unionBy from "lodash/unionBy";
|
|
16
16
|
import uniq from "lodash/uniq";
|
|
17
17
|
import Converter from "openapi-to-postmanv2";
|
|
18
|
-
import Collection from "postman-collection";
|
|
19
|
-
import sdk from "postman-collection";
|
|
18
|
+
import { Collection } from "postman-collection";
|
|
19
|
+
import * as sdk from "postman-collection";
|
|
20
20
|
|
|
21
21
|
import { sampleRequestFromSchema } from "./createRequestExample";
|
|
22
22
|
import { OpenApiObject, TagGroupObject, TagObject } from "./types";
|
package/src/types.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* ========================================================================== */
|
|
7
7
|
|
|
8
8
|
import { SidebarItemDoc } from "@docusaurus/plugin-content-docs/src/sidebars/types";
|
|
9
|
-
import
|
|
9
|
+
import Request from "postman-collection";
|
|
10
10
|
|
|
11
11
|
import {
|
|
12
12
|
InfoObject,
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/* ============================================================================
|
|
2
|
-
* Copyright (c) Palo Alto Networks
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
* ========================================================================== */
|
|
7
|
-
|
|
8
|
-
declare module "postman-collection" {
|
|
9
|
-
export default any;
|
|
10
|
-
}
|