docusaurus-theme-openapi-docs 0.0.0-1013 → 0.0.0-1015
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/theme/ParamsItem/index.d.ts +1 -4
- package/lib/types.d.ts +5 -116
- package/package.json +3 -3
- package/src/theme/ParamsItem/index.tsx +1 -5
- package/src/types.ts +5 -115
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
interface Map<T> {
|
|
3
|
-
[key: string]: T;
|
|
4
|
-
}
|
|
5
2
|
export interface ExampleObject {
|
|
6
3
|
summary?: string;
|
|
7
4
|
description?: string;
|
|
@@ -13,7 +10,7 @@ export interface Props {
|
|
|
13
10
|
param: {
|
|
14
11
|
description: string;
|
|
15
12
|
example: any;
|
|
16
|
-
examples:
|
|
13
|
+
examples: Record<string, ExampleObject>;
|
|
17
14
|
name: string;
|
|
18
15
|
required: boolean;
|
|
19
16
|
deprecated: boolean;
|
package/lib/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { DocFrontMatter as DocusaurusDocFrontMatter } from "@docusaurus/plugin-content-docs";
|
|
2
2
|
import type { JSONSchema4, JSONSchema6, JSONSchema7 } from "json-schema";
|
|
3
3
|
export interface ThemeConfig {
|
|
4
4
|
api?: {
|
|
@@ -6,9 +6,6 @@ export interface ThemeConfig {
|
|
|
6
6
|
authPersistance?: false | "localStorage" | "sessionStorage";
|
|
7
7
|
};
|
|
8
8
|
}
|
|
9
|
-
interface Map<T> {
|
|
10
|
-
[key: string]: T;
|
|
11
|
-
}
|
|
12
9
|
export type JSONSchema = JSONSchema4 | JSONSchema6 | JSONSchema7;
|
|
13
10
|
export type SchemaObject = Omit<JSONSchema, "type" | "allOf" | "oneOf" | "anyOf" | "not" | "items" | "properties" | "additionalProperties"> & {
|
|
14
11
|
type?: "string" | "number" | "integer" | "boolean" | "object" | "array";
|
|
@@ -17,7 +14,7 @@ export type SchemaObject = Omit<JSONSchema, "type" | "allOf" | "oneOf" | "anyOf"
|
|
|
17
14
|
anyOf?: SchemaObject[];
|
|
18
15
|
not?: SchemaObject;
|
|
19
16
|
items?: SchemaObject;
|
|
20
|
-
properties?:
|
|
17
|
+
properties?: Record<string, SchemaObject>;
|
|
21
18
|
additionalProperties?: boolean | SchemaObject;
|
|
22
19
|
nullable?: boolean;
|
|
23
20
|
discriminator?: DiscriminatorObject;
|
|
@@ -30,7 +27,7 @@ export type SchemaObject = Omit<JSONSchema, "type" | "allOf" | "oneOf" | "anyOf"
|
|
|
30
27
|
};
|
|
31
28
|
export interface DiscriminatorObject {
|
|
32
29
|
propertyName: string;
|
|
33
|
-
mapping?:
|
|
30
|
+
mapping?: Record<string, string>;
|
|
34
31
|
}
|
|
35
32
|
export interface XMLObject {
|
|
36
33
|
name?: string;
|
|
@@ -43,115 +40,7 @@ export interface ExternalDocumentationObject {
|
|
|
43
40
|
description?: string;
|
|
44
41
|
url: string;
|
|
45
42
|
}
|
|
46
|
-
export
|
|
47
|
-
author?: string;
|
|
48
|
-
/** Date can be any
|
|
49
|
-
* [parsable date string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse).
|
|
50
|
-
*/
|
|
51
|
-
date?: Date | string;
|
|
52
|
-
};
|
|
53
|
-
export type DocFrontMatter = {
|
|
54
|
-
/**
|
|
55
|
-
* The last part of the doc ID (will be refactored in the future to be the
|
|
56
|
-
* full ID instead)
|
|
57
|
-
* @see {@link DocMetadata.id}
|
|
58
|
-
*/
|
|
59
|
-
id?: string;
|
|
60
|
-
/**
|
|
61
|
-
* Will override the default title collected from h1 heading.
|
|
62
|
-
* @see {@link DocMetadata.title}
|
|
63
|
-
*/
|
|
64
|
-
title?: string;
|
|
65
|
-
/**
|
|
66
|
-
* Front matter tags, unnormalized.
|
|
67
|
-
* @see {@link DocMetadata.tags}
|
|
68
|
-
*/
|
|
69
|
-
tags?: FrontMatterTag[];
|
|
70
|
-
/**
|
|
71
|
-
* If there isn't a Markdown h1 heading (which, if there is, we don't
|
|
72
|
-
* remove), this front matter will cause the front matter title to not be
|
|
73
|
-
* displayed in the doc page.
|
|
74
|
-
*/
|
|
75
|
-
hide_title?: boolean;
|
|
76
|
-
/** Hide the TOC on the right. */
|
|
77
|
-
hide_table_of_contents?: boolean;
|
|
78
|
-
/** Used in the head meta. */
|
|
79
|
-
keywords?: string[];
|
|
80
|
-
/** Used in the head meta. Should use `assets.image` in priority. */
|
|
81
|
-
image?: string;
|
|
82
|
-
/**
|
|
83
|
-
* Will override the default excerpt.
|
|
84
|
-
* @see {@link DocMetadata.description}
|
|
85
|
-
*/
|
|
86
|
-
description?: string;
|
|
87
|
-
/**
|
|
88
|
-
* Custom slug appended after /<baseUrl>/<routeBasePath>/<versionPath>
|
|
89
|
-
* @see {@link DocMetadata.slug}
|
|
90
|
-
*/
|
|
91
|
-
slug?: string;
|
|
92
|
-
/** Customizes the sidebar label for this doc. Will default to its title. */
|
|
93
|
-
sidebar_label?: string;
|
|
94
|
-
/**
|
|
95
|
-
* Controls the position of a doc inside the generated sidebar slice when
|
|
96
|
-
* using autogenerated sidebar items.
|
|
97
|
-
*
|
|
98
|
-
* @see https://docusaurus.io/docs/sidebar#autogenerated-sidebar-metadata
|
|
99
|
-
*/
|
|
100
|
-
sidebar_position?: number;
|
|
101
|
-
/**
|
|
102
|
-
* Gives the corresponding sidebar label a special class name when using
|
|
103
|
-
* autogenerated sidebars.
|
|
104
|
-
*/
|
|
105
|
-
sidebar_class_name?: string;
|
|
106
|
-
/**
|
|
107
|
-
* Will be propagated to the final sidebars data structure. Useful if you
|
|
108
|
-
* have swizzled sidebar-related code or simply querying doc data through
|
|
109
|
-
* sidebars.
|
|
110
|
-
*/
|
|
111
|
-
sidebar_custom_props?: {
|
|
112
|
-
[key: string]: unknown;
|
|
113
|
-
};
|
|
114
|
-
/**
|
|
115
|
-
* Changes the sidebar association of the current doc. Use `null` to make
|
|
116
|
-
* the current doc not associated to any sidebar.
|
|
117
|
-
*/
|
|
118
|
-
displayed_sidebar?: string | null;
|
|
119
|
-
/**
|
|
120
|
-
* Customizes the pagination label for this doc. Will default to the sidebar
|
|
121
|
-
* label.
|
|
122
|
-
*/
|
|
123
|
-
pagination_label?: string;
|
|
124
|
-
/** Overrides the default URL computed for this doc. */
|
|
125
|
-
custom_edit_url?: string | null;
|
|
126
|
-
/**
|
|
127
|
-
* Whether number prefix parsing is disabled on this doc.
|
|
128
|
-
* @see https://docusaurus.io/docs/sidebar#using-number-prefixes
|
|
129
|
-
*/
|
|
130
|
-
parse_number_prefixes?: boolean;
|
|
131
|
-
/**
|
|
132
|
-
* Minimum TOC heading level. Must be between 2 and 6 and lower or equal to
|
|
133
|
-
* the max value.
|
|
134
|
-
*/
|
|
135
|
-
toc_min_heading_level?: number;
|
|
136
|
-
/** Maximum TOC heading level. Must be between 2 and 6. */
|
|
137
|
-
toc_max_heading_level?: number;
|
|
138
|
-
/**
|
|
139
|
-
* The ID of the documentation you want the "Next" pagination to link to.
|
|
140
|
-
* Use `null` to disable showing "Next" for this page.
|
|
141
|
-
* @see {@link DocMetadata.next}
|
|
142
|
-
*/
|
|
143
|
-
pagination_next?: string | null;
|
|
144
|
-
/**
|
|
145
|
-
* The ID of the documentation you want the "Previous" pagination to link
|
|
146
|
-
* to. Use `null` to disable showing "Previous" for this page.
|
|
147
|
-
* @see {@link DocMetadata.prev}
|
|
148
|
-
*/
|
|
149
|
-
pagination_prev?: string | null;
|
|
150
|
-
/** Should this doc be excluded from production builds? */
|
|
151
|
-
draft?: boolean;
|
|
152
|
-
/** Allows overriding the last updated author and/or date. */
|
|
153
|
-
last_update?: FileChange;
|
|
43
|
+
export interface DocFrontMatter extends DocusaurusDocFrontMatter {
|
|
154
44
|
/** Provides OpenAPI Docs with a reference path to their respective Info Doc */
|
|
155
45
|
info_path?: string;
|
|
156
|
-
}
|
|
157
|
-
export {};
|
|
46
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "docusaurus-theme-openapi-docs",
|
|
3
3
|
"description": "OpenAPI theme for Docusaurus.",
|
|
4
|
-
"version": "0.0.0-
|
|
4
|
+
"version": "0.0.0-1015",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"openapi",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@types/lodash": "^4.14.176",
|
|
37
37
|
"@types/pako": "^2.0.3",
|
|
38
38
|
"concurrently": "^5.2.0",
|
|
39
|
-
"docusaurus-plugin-openapi-docs": "0.0.0-
|
|
39
|
+
"docusaurus-plugin-openapi-docs": "0.0.0-1015",
|
|
40
40
|
"docusaurus-plugin-sass": "^0.2.3",
|
|
41
41
|
"eslint-plugin-prettier": "^5.0.1"
|
|
42
42
|
},
|
|
@@ -79,5 +79,5 @@
|
|
|
79
79
|
"engines": {
|
|
80
80
|
"node": ">=14"
|
|
81
81
|
},
|
|
82
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "d127b26d4807d51e164052e9867267c03274b9d9"
|
|
83
83
|
}
|
|
@@ -16,10 +16,6 @@ import clsx from "clsx";
|
|
|
16
16
|
import { getQualifierMessage, getSchemaName } from "../../markdown/schema";
|
|
17
17
|
import { guard, toString } from "../../markdown/utils";
|
|
18
18
|
|
|
19
|
-
interface Map<T> {
|
|
20
|
-
[key: string]: T;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
19
|
export interface ExampleObject {
|
|
24
20
|
summary?: string;
|
|
25
21
|
description?: string;
|
|
@@ -32,7 +28,7 @@ export interface Props {
|
|
|
32
28
|
param: {
|
|
33
29
|
description: string;
|
|
34
30
|
example: any;
|
|
35
|
-
examples:
|
|
31
|
+
examples: Record<string, ExampleObject>;
|
|
36
32
|
name: string;
|
|
37
33
|
required: boolean;
|
|
38
34
|
deprecated: boolean;
|
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 {
|
|
8
|
+
import type { DocFrontMatter as DocusaurusDocFrontMatter } from "@docusaurus/plugin-content-docs";
|
|
9
9
|
import type { JSONSchema4, JSONSchema6, JSONSchema7 } from "json-schema";
|
|
10
10
|
|
|
11
11
|
export interface ThemeConfig {
|
|
@@ -15,10 +15,6 @@ export interface ThemeConfig {
|
|
|
15
15
|
};
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
interface Map<T> {
|
|
19
|
-
[key: string]: T;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
18
|
export type JSONSchema = JSONSchema4 | JSONSchema6 | JSONSchema7;
|
|
23
19
|
export type SchemaObject = Omit<
|
|
24
20
|
JSONSchema,
|
|
@@ -38,7 +34,7 @@ export type SchemaObject = Omit<
|
|
|
38
34
|
anyOf?: SchemaObject[];
|
|
39
35
|
not?: SchemaObject;
|
|
40
36
|
items?: SchemaObject;
|
|
41
|
-
properties?:
|
|
37
|
+
properties?: Record<string, SchemaObject>;
|
|
42
38
|
additionalProperties?: boolean | SchemaObject;
|
|
43
39
|
|
|
44
40
|
// OpenAPI additions
|
|
@@ -54,7 +50,7 @@ export type SchemaObject = Omit<
|
|
|
54
50
|
|
|
55
51
|
export interface DiscriminatorObject {
|
|
56
52
|
propertyName: string;
|
|
57
|
-
mapping?:
|
|
53
|
+
mapping?: Record<string, string>;
|
|
58
54
|
}
|
|
59
55
|
|
|
60
56
|
export interface XMLObject {
|
|
@@ -70,113 +66,7 @@ export interface ExternalDocumentationObject {
|
|
|
70
66
|
url: string;
|
|
71
67
|
}
|
|
72
68
|
|
|
73
|
-
export
|
|
74
|
-
author?: string;
|
|
75
|
-
/** Date can be any
|
|
76
|
-
* [parsable date string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse).
|
|
77
|
-
*/
|
|
78
|
-
date?: Date | string;
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
export type DocFrontMatter = {
|
|
82
|
-
/**
|
|
83
|
-
* The last part of the doc ID (will be refactored in the future to be the
|
|
84
|
-
* full ID instead)
|
|
85
|
-
* @see {@link DocMetadata.id}
|
|
86
|
-
*/
|
|
87
|
-
id?: string;
|
|
88
|
-
/**
|
|
89
|
-
* Will override the default title collected from h1 heading.
|
|
90
|
-
* @see {@link DocMetadata.title}
|
|
91
|
-
*/
|
|
92
|
-
title?: string;
|
|
93
|
-
/**
|
|
94
|
-
* Front matter tags, unnormalized.
|
|
95
|
-
* @see {@link DocMetadata.tags}
|
|
96
|
-
*/
|
|
97
|
-
tags?: FrontMatterTag[];
|
|
98
|
-
/**
|
|
99
|
-
* If there isn't a Markdown h1 heading (which, if there is, we don't
|
|
100
|
-
* remove), this front matter will cause the front matter title to not be
|
|
101
|
-
* displayed in the doc page.
|
|
102
|
-
*/
|
|
103
|
-
hide_title?: boolean;
|
|
104
|
-
/** Hide the TOC on the right. */
|
|
105
|
-
hide_table_of_contents?: boolean;
|
|
106
|
-
/** Used in the head meta. */
|
|
107
|
-
keywords?: string[];
|
|
108
|
-
/** Used in the head meta. Should use `assets.image` in priority. */
|
|
109
|
-
image?: string;
|
|
110
|
-
/**
|
|
111
|
-
* Will override the default excerpt.
|
|
112
|
-
* @see {@link DocMetadata.description}
|
|
113
|
-
*/
|
|
114
|
-
description?: string;
|
|
115
|
-
/**
|
|
116
|
-
* Custom slug appended after /<baseUrl>/<routeBasePath>/<versionPath>
|
|
117
|
-
* @see {@link DocMetadata.slug}
|
|
118
|
-
*/
|
|
119
|
-
slug?: string;
|
|
120
|
-
/** Customizes the sidebar label for this doc. Will default to its title. */
|
|
121
|
-
sidebar_label?: string;
|
|
122
|
-
/**
|
|
123
|
-
* Controls the position of a doc inside the generated sidebar slice when
|
|
124
|
-
* using autogenerated sidebar items.
|
|
125
|
-
*
|
|
126
|
-
* @see https://docusaurus.io/docs/sidebar#autogenerated-sidebar-metadata
|
|
127
|
-
*/
|
|
128
|
-
sidebar_position?: number;
|
|
129
|
-
/**
|
|
130
|
-
* Gives the corresponding sidebar label a special class name when using
|
|
131
|
-
* autogenerated sidebars.
|
|
132
|
-
*/
|
|
133
|
-
sidebar_class_name?: string;
|
|
134
|
-
/**
|
|
135
|
-
* Will be propagated to the final sidebars data structure. Useful if you
|
|
136
|
-
* have swizzled sidebar-related code or simply querying doc data through
|
|
137
|
-
* sidebars.
|
|
138
|
-
*/
|
|
139
|
-
sidebar_custom_props?: { [key: string]: unknown };
|
|
140
|
-
/**
|
|
141
|
-
* Changes the sidebar association of the current doc. Use `null` to make
|
|
142
|
-
* the current doc not associated to any sidebar.
|
|
143
|
-
*/
|
|
144
|
-
displayed_sidebar?: string | null;
|
|
145
|
-
/**
|
|
146
|
-
* Customizes the pagination label for this doc. Will default to the sidebar
|
|
147
|
-
* label.
|
|
148
|
-
*/
|
|
149
|
-
pagination_label?: string;
|
|
150
|
-
/** Overrides the default URL computed for this doc. */
|
|
151
|
-
custom_edit_url?: string | null;
|
|
152
|
-
/**
|
|
153
|
-
* Whether number prefix parsing is disabled on this doc.
|
|
154
|
-
* @see https://docusaurus.io/docs/sidebar#using-number-prefixes
|
|
155
|
-
*/
|
|
156
|
-
parse_number_prefixes?: boolean;
|
|
157
|
-
/**
|
|
158
|
-
* Minimum TOC heading level. Must be between 2 and 6 and lower or equal to
|
|
159
|
-
* the max value.
|
|
160
|
-
*/
|
|
161
|
-
toc_min_heading_level?: number;
|
|
162
|
-
/** Maximum TOC heading level. Must be between 2 and 6. */
|
|
163
|
-
toc_max_heading_level?: number;
|
|
164
|
-
/**
|
|
165
|
-
* The ID of the documentation you want the "Next" pagination to link to.
|
|
166
|
-
* Use `null` to disable showing "Next" for this page.
|
|
167
|
-
* @see {@link DocMetadata.next}
|
|
168
|
-
*/
|
|
169
|
-
pagination_next?: string | null;
|
|
170
|
-
/**
|
|
171
|
-
* The ID of the documentation you want the "Previous" pagination to link
|
|
172
|
-
* to. Use `null` to disable showing "Previous" for this page.
|
|
173
|
-
* @see {@link DocMetadata.prev}
|
|
174
|
-
*/
|
|
175
|
-
pagination_prev?: string | null;
|
|
176
|
-
/** Should this doc be excluded from production builds? */
|
|
177
|
-
draft?: boolean;
|
|
178
|
-
/** Allows overriding the last updated author and/or date. */
|
|
179
|
-
last_update?: FileChange;
|
|
69
|
+
export interface DocFrontMatter extends DocusaurusDocFrontMatter {
|
|
180
70
|
/** Provides OpenAPI Docs with a reference path to their respective Info Doc */
|
|
181
71
|
info_path?: string;
|
|
182
|
-
}
|
|
72
|
+
}
|