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.
Files changed (64) hide show
  1. package/lib/markdown/schema.js +5 -0
  2. package/lib/theme/ApiExplorer/Authorization/slice.d.ts +1 -1
  3. package/lib/theme/ApiExplorer/Body/FormBodyItem/index.d.ts +1 -1
  4. package/lib/theme/ApiExplorer/Body/FormBodyItem/index.js +1 -1
  5. package/lib/theme/ApiExplorer/Body/index.d.ts +1 -1
  6. package/lib/theme/ApiExplorer/Body/index.js +264 -129
  7. package/lib/theme/ApiExplorer/Body/resolveSchemaWithSelections.d.ts +13 -0
  8. package/lib/theme/ApiExplorer/Body/resolveSchemaWithSelections.js +133 -0
  9. package/lib/theme/ApiExplorer/ParamOptions/slice.d.ts +1 -1
  10. package/lib/theme/ApiExplorer/Request/index.d.ts +1 -1
  11. package/lib/theme/ApiExplorer/Response/index.d.ts +1 -1
  12. package/lib/theme/ApiExplorer/SchemaSelection/index.d.ts +2 -0
  13. package/lib/theme/ApiExplorer/SchemaSelection/index.js +36 -0
  14. package/lib/theme/ApiExplorer/SchemaSelection/slice.d.ts +37 -0
  15. package/lib/theme/ApiExplorer/SchemaSelection/slice.js +39 -0
  16. package/lib/theme/ApiExplorer/SecuritySchemes/index.js +2 -2
  17. package/lib/theme/ApiExplorer/Server/slice.d.ts +1 -1
  18. package/lib/theme/ApiExplorer/buildPostmanRequest.d.ts +1 -1
  19. package/lib/theme/ApiExplorer/index.d.ts +1 -1
  20. package/lib/theme/ApiExplorer/persistenceMiddleware.d.ts +2 -0
  21. package/lib/theme/ApiItem/hooks.d.ts +1 -0
  22. package/lib/theme/ApiItem/index.js +1 -0
  23. package/lib/theme/ApiItem/store.d.ts +6 -0
  24. package/lib/theme/ApiItem/store.js +6 -2
  25. package/lib/theme/ParamsDetails/index.js +2 -2
  26. package/lib/theme/RequestSchema/index.d.ts +1 -1
  27. package/lib/theme/RequestSchema/index.js +60 -54
  28. package/lib/theme/ResponseSchema/index.d.ts +1 -1
  29. package/lib/theme/Schema/index.d.ts +7 -1
  30. package/lib/theme/Schema/index.js +135 -9
  31. package/lib/theme/SchemaTabs/index.d.ts +8 -1
  32. package/lib/theme/SchemaTabs/index.js +10 -1
  33. package/lib/theme/StatusCodes/index.d.ts +1 -1
  34. package/lib/theme/styles.scss +10 -0
  35. package/package.json +3 -3
  36. package/src/markdown/schema.ts +6 -0
  37. package/src/theme/ApiExplorer/Authorization/slice.ts +1 -1
  38. package/src/theme/ApiExplorer/Body/FileArrayFormBodyItem/index.tsx +2 -0
  39. package/src/theme/ApiExplorer/Body/FormBodyItem/index.tsx +4 -2
  40. package/src/theme/ApiExplorer/Body/index.tsx +208 -125
  41. package/src/theme/ApiExplorer/Body/resolveSchemaWithSelections.ts +155 -0
  42. package/src/theme/ApiExplorer/FormItem/index.tsx +0 -1
  43. package/src/theme/ApiExplorer/ParamOptions/slice.ts +1 -1
  44. package/src/theme/ApiExplorer/Request/index.tsx +2 -2
  45. package/src/theme/ApiExplorer/Response/index.tsx +2 -3
  46. package/{lib/types.js → src/theme/ApiExplorer/SchemaSelection/index.ts} +7 -2
  47. package/src/theme/ApiExplorer/SchemaSelection/slice.ts +46 -0
  48. package/src/theme/ApiExplorer/SecuritySchemes/index.tsx +2 -3
  49. package/src/theme/ApiExplorer/Server/slice.ts +1 -1
  50. package/src/theme/ApiExplorer/buildPostmanRequest.ts +1 -1
  51. package/src/theme/ApiExplorer/index.tsx +1 -1
  52. package/src/theme/ApiItem/index.tsx +2 -1
  53. package/src/theme/ApiItem/store.ts +2 -0
  54. package/src/theme/ParamsDetails/index.tsx +2 -3
  55. package/src/theme/RequestSchema/index.tsx +52 -43
  56. package/src/theme/ResponseSchema/index.tsx +1 -1
  57. package/src/theme/Schema/index.tsx +186 -29
  58. package/src/theme/SchemaTabs/index.tsx +15 -4
  59. package/src/theme/StatusCodes/index.tsx +1 -2
  60. package/src/theme/styles.scss +10 -0
  61. package/src/types.d.ts +36 -0
  62. package/tsconfig.tsbuildinfo +1 -1
  63. package/lib/types.d.ts +0 -54
  64. 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
- }