docusaurus-theme-openapi-docs 4.6.0 → 4.7.0

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 (36) hide show
  1. package/lib/markdown/schema.js +5 -0
  2. package/lib/theme/ApiExplorer/Body/index.js +263 -128
  3. package/lib/theme/ApiExplorer/Body/resolveSchemaWithSelections.d.ts +13 -0
  4. package/lib/theme/ApiExplorer/Body/resolveSchemaWithSelections.js +133 -0
  5. package/lib/theme/ApiExplorer/SchemaSelection/index.d.ts +2 -0
  6. package/lib/theme/ApiExplorer/SchemaSelection/index.js +36 -0
  7. package/lib/theme/ApiExplorer/SchemaSelection/slice.d.ts +37 -0
  8. package/lib/theme/ApiExplorer/SchemaSelection/slice.js +39 -0
  9. package/lib/theme/ApiExplorer/persistenceMiddleware.d.ts +2 -0
  10. package/lib/theme/ApiItem/hooks.d.ts +1 -0
  11. package/lib/theme/ApiItem/index.js +1 -0
  12. package/lib/theme/ApiItem/store.d.ts +6 -0
  13. package/lib/theme/ApiItem/store.js +6 -2
  14. package/lib/theme/RequestSchema/index.js +58 -52
  15. package/lib/theme/Schema/index.d.ts +6 -0
  16. package/lib/theme/Schema/index.js +135 -9
  17. package/lib/theme/SchemaTabs/index.d.ts +8 -1
  18. package/lib/theme/SchemaTabs/index.js +10 -1
  19. package/lib/theme/StatusCodes/index.d.ts +1 -1
  20. package/lib/theme/styles.scss +10 -0
  21. package/package.json +3 -3
  22. package/src/markdown/schema.ts +6 -0
  23. package/src/theme/ApiExplorer/Body/index.tsx +206 -122
  24. package/src/theme/ApiExplorer/Body/resolveSchemaWithSelections.ts +155 -0
  25. package/{lib/types.js → src/theme/ApiExplorer/SchemaSelection/index.ts} +7 -2
  26. package/src/theme/ApiExplorer/SchemaSelection/slice.ts +46 -0
  27. package/src/theme/ApiItem/index.tsx +1 -0
  28. package/src/theme/ApiItem/store.ts +2 -0
  29. package/src/theme/RequestSchema/index.tsx +49 -39
  30. package/src/theme/Schema/index.tsx +184 -27
  31. package/src/theme/SchemaTabs/index.tsx +15 -4
  32. package/src/theme/StatusCodes/index.tsx +1 -2
  33. package/src/theme/styles.scss +10 -0
  34. package/tsconfig.tsbuildinfo +1 -1
  35. package/lib/types.d.ts +0 -54
  36. /package/src/{types.ts → types.d.ts} +0 -0
package/lib/types.d.ts DELETED
@@ -1,54 +0,0 @@
1
- import type { DocFrontMatter as DocusaurusDocFrontMatter } from "@docusaurus/plugin-content-docs";
2
- import type { JSONSchema4, JSONSchema6, JSONSchema7 } from "json-schema";
3
- export interface ThemeConfig {
4
- api?: {
5
- proxy?: string;
6
- /**
7
- * Controls how authentication credentials are persisted in the API explorer.
8
- * - `false`: No persistence (in-memory only)
9
- * - `"sessionStorage"`: Persist for the browser session (default)
10
- * - `"localStorage"`: Persist across browser sessions
11
- */
12
- authPersistence?: false | "sessionStorage" | "localStorage";
13
- /** Request timeout in milliseconds. Defaults to 30000 (30 seconds). */
14
- requestTimeout?: number;
15
- };
16
- }
17
- export type JSONSchema = JSONSchema4 | JSONSchema6 | JSONSchema7;
18
- export type SchemaObject = Omit<JSONSchema, "type" | "allOf" | "oneOf" | "anyOf" | "not" | "items" | "properties" | "additionalProperties"> & {
19
- type?: "string" | "number" | "integer" | "boolean" | "object" | "array";
20
- allOf?: SchemaObject[];
21
- oneOf?: SchemaObject[];
22
- anyOf?: SchemaObject[];
23
- not?: SchemaObject;
24
- items?: SchemaObject;
25
- properties?: Record<string, SchemaObject>;
26
- additionalProperties?: boolean | SchemaObject;
27
- nullable?: boolean;
28
- discriminator?: DiscriminatorObject;
29
- readOnly?: boolean;
30
- writeOnly?: boolean;
31
- xml?: XMLObject;
32
- externalDocs?: ExternalDocumentationObject;
33
- example?: any;
34
- deprecated?: boolean;
35
- };
36
- export interface DiscriminatorObject {
37
- propertyName: string;
38
- mapping?: Record<string, string>;
39
- }
40
- export interface XMLObject {
41
- name?: string;
42
- namespace?: string;
43
- prefix?: string;
44
- attribute?: boolean;
45
- wrapped?: boolean;
46
- }
47
- export interface ExternalDocumentationObject {
48
- description?: string;
49
- url: string;
50
- }
51
- export interface DocFrontMatter extends DocusaurusDocFrontMatter {
52
- /** Provides OpenAPI Docs with a reference path to their respective Info Doc */
53
- info_path?: string;
54
- }
File without changes