docusaurus-plugin-openapi-docs 0.0.0-396 → 0.0.0-397

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.
@@ -64,10 +64,9 @@ export function getQualifierMessage(schema?: SchemaObject): string | undefined {
64
64
  return undefined;
65
65
  }
66
66
 
67
- // TODO: This doesn't seem right
68
- // if (schema.items) {
69
- // return getQualifierMessage(schema.items);
70
- // }
67
+ if (schema.items) {
68
+ return getQualifierMessage(schema.items);
69
+ }
71
70
 
72
71
  let message = "**Possible values:** ";
73
72
 
@@ -326,7 +326,7 @@ export type SchemaObject = Omit<
326
326
  not?: SchemaObject;
327
327
  items?: SchemaObject;
328
328
  properties?: Map<SchemaObject>;
329
- additionalProperties?: boolean | SchemaObject;
329
+ additionalProperties?: Map<SchemaObject>;
330
330
 
331
331
  // OpenAPI additions
332
332
  nullable?: boolean;
@@ -1 +0,0 @@
1
- export declare function createAnyOneOf(anyOneOf: any[], type: string): string | undefined;
@@ -1,48 +0,0 @@
1
- "use strict";
2
- /* ============================================================================
3
- * Copyright (c) Palo Alto Networks
4
- *
5
- * This source code is licensed under the MIT license found in the
6
- * LICENSE file in the root directory of this source tree.
7
- * ========================================================================== */
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.createAnyOneOf = void 0;
10
- const createSchemaDetails_1 = require("./createSchemaDetails");
11
- const utils_1 = require("./utils");
12
- function createAnyOneOf(anyOneOf, type) {
13
- if (anyOneOf === undefined) {
14
- return undefined;
15
- }
16
- if (anyOneOf.length === 0) {
17
- return undefined;
18
- }
19
- return (0, utils_1.create)("div", {
20
- children: [
21
- (0, utils_1.create)("span", {
22
- className: "badge badge--info",
23
- children: type,
24
- }),
25
- (0, utils_1.create)("SchemaTabs", {
26
- children: anyOneOf.map((schema, index) => {
27
- const label = schema.title ? schema.title : `MOD${index + 1}`;
28
- if (schema.properties !== undefined) {
29
- return (0, utils_1.create)("TabItem", {
30
- label: label,
31
- value: `${index}-properties`,
32
- children: [(0, createSchemaDetails_1.createRows)({ schema: schema })],
33
- });
34
- }
35
- if (schema.allOf !== undefined) {
36
- return (0, utils_1.create)("TabItem", {
37
- label: label,
38
- value: `${index}-allOf`,
39
- children: [(0, createSchemaDetails_1.createRows)({ schema: schema })],
40
- });
41
- }
42
- return undefined;
43
- }),
44
- }),
45
- ],
46
- });
47
- }
48
- exports.createAnyOneOf = createAnyOneOf;
@@ -1,51 +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 { createRows } from "./createSchemaDetails";
9
- import { create } from "./utils";
10
-
11
- export function createAnyOneOf(anyOneOf: any[], type: string) {
12
- if (anyOneOf === undefined) {
13
- return undefined;
14
- }
15
-
16
- if (anyOneOf.length === 0) {
17
- return undefined;
18
- }
19
-
20
- return create("div", {
21
- children: [
22
- create("span", {
23
- className: "badge badge--info",
24
- children: type,
25
- }),
26
- create("SchemaTabs", {
27
- children: anyOneOf.map((schema, index) => {
28
- const label = schema.title ? schema.title : `MOD${index + 1}`;
29
-
30
- if (schema.properties !== undefined) {
31
- return create("TabItem", {
32
- label: label,
33
- value: `${index}-properties`,
34
- children: [createRows({ schema: schema })],
35
- });
36
- }
37
-
38
- if (schema.allOf !== undefined) {
39
- return create("TabItem", {
40
- label: label,
41
- value: `${index}-allOf`,
42
- children: [createRows({ schema: schema })],
43
- });
44
- }
45
-
46
- return undefined;
47
- }),
48
- }),
49
- ],
50
- });
51
- }