docusaurus-plugin-openapi-docs 0.0.0-613 → 0.0.0-616
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 +11 -1
- package/lib/markdown/createRequestSchema.d.ts +1 -8
- package/lib/markdown/createRequestSchema.js +4 -684
- package/lib/markdown/createResponseSchema.d.ts +1 -8
- package/lib/markdown/createResponseSchema.js +3 -685
- package/lib/markdown/createSchema.d.ts +12 -0
- package/lib/markdown/createSchema.js +594 -0
- package/lib/openapi/createRequestExample.js +3 -3
- package/lib/openapi/createResponseExample.js +3 -3
- package/package.json +2 -2
- package/src/index.ts +11 -1
- package/src/markdown/createRequestSchema.ts +2 -891
- package/src/markdown/createResponseSchema.ts +2 -894
- package/src/markdown/createSchema.ts +793 -0
- package/src/openapi/createRequestExample.ts +1 -1
- package/src/openapi/createResponseExample.ts +1 -1
package/lib/index.js
CHANGED
|
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.getDocsPluginConfig = exports.isURL = void 0;
|
|
13
13
|
const fs_1 = __importDefault(require("fs"));
|
|
14
14
|
const path_1 = __importDefault(require("path"));
|
|
15
|
+
const zlib_1 = __importDefault(require("zlib"));
|
|
15
16
|
const utils_1 = require("@docusaurus/utils");
|
|
16
17
|
const chalk_1 = __importDefault(require("chalk"));
|
|
17
18
|
const mustache_1 = require("mustache");
|
|
@@ -210,7 +211,16 @@ import {useCurrentSidebarCategory} from '@docusaurus/theme-common';
|
|
|
210
211
|
: tagPageGenerator(item);
|
|
211
212
|
item.markdown = markdown;
|
|
212
213
|
if (item.type === "api") {
|
|
213
|
-
|
|
214
|
+
// opportunity to compress JSON
|
|
215
|
+
// const serialize = (o: any) => {
|
|
216
|
+
// return zlib.deflateSync(JSON.stringify(o)).toString("base64");
|
|
217
|
+
// };
|
|
218
|
+
// const deserialize = (s: any) => {
|
|
219
|
+
// return zlib.inflateSync(Buffer.from(s, "base64")).toString();
|
|
220
|
+
// };
|
|
221
|
+
item.json = zlib_1.default
|
|
222
|
+
.deflateSync(JSON.stringify(item.api))
|
|
223
|
+
.toString("base64");
|
|
214
224
|
let infoBasePath = `${outputDir}/${item.infoId}`;
|
|
215
225
|
if (docRouteBasePath) {
|
|
216
226
|
infoBasePath = `${docRouteBasePath}/${outputDir
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
import { MediaTypeObject
|
|
2
|
-
/**
|
|
3
|
-
* Returns a merged representation of allOf array of schemas.
|
|
4
|
-
*/
|
|
5
|
-
export declare function mergeAllOf(allOf: SchemaObject[]): {
|
|
6
|
-
mergedSchemas: any;
|
|
7
|
-
required: any;
|
|
8
|
-
};
|
|
1
|
+
import { MediaTypeObject } from "../openapi/types";
|
|
9
2
|
interface Props {
|
|
10
3
|
style?: any;
|
|
11
4
|
title: string;
|