docusaurus-theme-openapi-docs 4.6.0 → 4.7.1
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/markdown/schema.js +5 -0
- package/lib/theme/ApiExplorer/Authorization/slice.d.ts +1 -1
- package/lib/theme/ApiExplorer/Body/FormBodyItem/index.d.ts +1 -1
- package/lib/theme/ApiExplorer/Body/FormBodyItem/index.js +1 -1
- package/lib/theme/ApiExplorer/Body/index.d.ts +1 -1
- package/lib/theme/ApiExplorer/Body/index.js +264 -129
- package/lib/theme/ApiExplorer/Body/resolveSchemaWithSelections.d.ts +13 -0
- package/lib/theme/ApiExplorer/Body/resolveSchemaWithSelections.js +133 -0
- package/lib/theme/ApiExplorer/ParamOptions/slice.d.ts +1 -1
- package/lib/theme/ApiExplorer/Request/index.d.ts +1 -1
- package/lib/theme/ApiExplorer/Response/index.d.ts +1 -1
- package/lib/theme/ApiExplorer/SchemaSelection/index.d.ts +2 -0
- package/lib/theme/ApiExplorer/SchemaSelection/index.js +36 -0
- package/lib/theme/ApiExplorer/SchemaSelection/slice.d.ts +37 -0
- package/lib/theme/ApiExplorer/SchemaSelection/slice.js +39 -0
- package/lib/theme/ApiExplorer/SecuritySchemes/index.js +2 -2
- package/lib/theme/ApiExplorer/Server/slice.d.ts +1 -1
- package/lib/theme/ApiExplorer/buildPostmanRequest.d.ts +1 -1
- package/lib/theme/ApiExplorer/index.d.ts +1 -1
- package/lib/theme/ApiExplorer/persistenceMiddleware.d.ts +2 -0
- package/lib/theme/ApiItem/hooks.d.ts +1 -0
- package/lib/theme/ApiItem/index.js +1 -0
- package/lib/theme/ApiItem/store.d.ts +6 -0
- package/lib/theme/ApiItem/store.js +6 -2
- package/lib/theme/ParamsDetails/index.js +2 -2
- package/lib/theme/RequestSchema/index.d.ts +1 -1
- package/lib/theme/RequestSchema/index.js +60 -54
- package/lib/theme/ResponseSchema/index.d.ts +1 -1
- package/lib/theme/Schema/index.d.ts +7 -1
- package/lib/theme/Schema/index.js +135 -9
- package/lib/theme/SchemaTabs/index.d.ts +8 -1
- package/lib/theme/SchemaTabs/index.js +10 -1
- package/lib/theme/StatusCodes/index.d.ts +1 -1
- package/lib/theme/styles.scss +10 -0
- package/package.json +3 -3
- package/src/markdown/schema.ts +6 -0
- package/src/theme/ApiExplorer/Authorization/slice.ts +1 -1
- package/src/theme/ApiExplorer/Body/FileArrayFormBodyItem/index.tsx +2 -0
- package/src/theme/ApiExplorer/Body/FormBodyItem/index.tsx +4 -2
- package/src/theme/ApiExplorer/Body/index.tsx +208 -125
- package/src/theme/ApiExplorer/Body/resolveSchemaWithSelections.ts +155 -0
- package/src/theme/ApiExplorer/FormItem/index.tsx +0 -1
- package/src/theme/ApiExplorer/ParamOptions/slice.ts +1 -1
- package/src/theme/ApiExplorer/Request/index.tsx +2 -2
- package/src/theme/ApiExplorer/Response/index.tsx +2 -3
- package/{lib/types.js → src/theme/ApiExplorer/SchemaSelection/index.ts} +7 -2
- package/src/theme/ApiExplorer/SchemaSelection/slice.ts +46 -0
- package/src/theme/ApiExplorer/SecuritySchemes/index.tsx +2 -3
- package/src/theme/ApiExplorer/Server/slice.ts +1 -1
- package/src/theme/ApiExplorer/buildPostmanRequest.ts +1 -1
- package/src/theme/ApiExplorer/index.tsx +1 -1
- package/src/theme/ApiItem/index.tsx +2 -1
- package/src/theme/ApiItem/store.ts +2 -0
- package/src/theme/ParamsDetails/index.tsx +2 -3
- package/src/theme/RequestSchema/index.tsx +52 -43
- package/src/theme/ResponseSchema/index.tsx +1 -1
- package/src/theme/Schema/index.tsx +186 -29
- package/src/theme/SchemaTabs/index.tsx +15 -4
- package/src/theme/StatusCodes/index.tsx +1 -2
- package/src/theme/styles.scss +10 -0
- package/src/types.d.ts +36 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/lib/types.d.ts +0 -54
- package/src/types.ts +0 -80
package/src/types.ts
DELETED
|
@@ -1,80 +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
|
-
import type { DocFrontMatter as DocusaurusDocFrontMatter } from "@docusaurus/plugin-content-docs";
|
|
9
|
-
import type { JSONSchema4, JSONSchema6, JSONSchema7 } from "json-schema";
|
|
10
|
-
|
|
11
|
-
export interface ThemeConfig {
|
|
12
|
-
api?: {
|
|
13
|
-
proxy?: string;
|
|
14
|
-
/**
|
|
15
|
-
* Controls how authentication credentials are persisted in the API explorer.
|
|
16
|
-
* - `false`: No persistence (in-memory only)
|
|
17
|
-
* - `"sessionStorage"`: Persist for the browser session (default)
|
|
18
|
-
* - `"localStorage"`: Persist across browser sessions
|
|
19
|
-
*/
|
|
20
|
-
authPersistence?: false | "sessionStorage" | "localStorage";
|
|
21
|
-
/** Request timeout in milliseconds. Defaults to 30000 (30 seconds). */
|
|
22
|
-
requestTimeout?: number;
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export type JSONSchema = JSONSchema4 | JSONSchema6 | JSONSchema7;
|
|
27
|
-
export type SchemaObject = Omit<
|
|
28
|
-
JSONSchema,
|
|
29
|
-
| "type"
|
|
30
|
-
| "allOf"
|
|
31
|
-
| "oneOf"
|
|
32
|
-
| "anyOf"
|
|
33
|
-
| "not"
|
|
34
|
-
| "items"
|
|
35
|
-
| "properties"
|
|
36
|
-
| "additionalProperties"
|
|
37
|
-
> & {
|
|
38
|
-
// OpenAPI specific overrides
|
|
39
|
-
type?: "string" | "number" | "integer" | "boolean" | "object" | "array";
|
|
40
|
-
allOf?: SchemaObject[];
|
|
41
|
-
oneOf?: SchemaObject[];
|
|
42
|
-
anyOf?: SchemaObject[];
|
|
43
|
-
not?: SchemaObject;
|
|
44
|
-
items?: SchemaObject;
|
|
45
|
-
properties?: Record<string, SchemaObject>;
|
|
46
|
-
additionalProperties?: boolean | SchemaObject;
|
|
47
|
-
|
|
48
|
-
// OpenAPI additions
|
|
49
|
-
nullable?: boolean;
|
|
50
|
-
discriminator?: DiscriminatorObject;
|
|
51
|
-
readOnly?: boolean;
|
|
52
|
-
writeOnly?: boolean;
|
|
53
|
-
xml?: XMLObject;
|
|
54
|
-
externalDocs?: ExternalDocumentationObject;
|
|
55
|
-
example?: any;
|
|
56
|
-
deprecated?: boolean;
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
export interface DiscriminatorObject {
|
|
60
|
-
propertyName: string;
|
|
61
|
-
mapping?: Record<string, string>;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export interface XMLObject {
|
|
65
|
-
name?: string;
|
|
66
|
-
namespace?: string;
|
|
67
|
-
prefix?: string;
|
|
68
|
-
attribute?: boolean;
|
|
69
|
-
wrapped?: boolean;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
export interface ExternalDocumentationObject {
|
|
73
|
-
description?: string;
|
|
74
|
-
url: string;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
export interface DocFrontMatter extends DocusaurusDocFrontMatter {
|
|
78
|
-
/** Provides OpenAPI Docs with a reference path to their respective Info Doc */
|
|
79
|
-
info_path?: string;
|
|
80
|
-
}
|