docusaurus-theme-openapi-docs 0.0.0-1361 → 0.0.0-1362

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.
@@ -254,6 +254,7 @@ const AnyOneOf = ({ schema, schemaType, schemaPath }) => {
254
254
  }),
255
255
  anyOneSchema.type === "object" &&
256
256
  !anyOneSchema.properties &&
257
+ !anyOneSchema.additionalProperties &&
257
258
  !anyOneSchema.allOf &&
258
259
  !anyOneSchema.oneOf &&
259
260
  !anyOneSchema.anyOf &&
@@ -275,6 +276,15 @@ const AnyOneOf = ({ schema, schemaType, schemaPath }) => {
275
276
  schemaType: schemaType,
276
277
  schemaPath: childSchemaPath,
277
278
  }),
279
+ (anyOneSchema.type === "object" || !anyOneSchema.type) &&
280
+ anyOneSchema.additionalProperties &&
281
+ !anyOneSchema.oneOf &&
282
+ !anyOneSchema.anyOf &&
283
+ !anyOneSchema.allOf &&
284
+ react_1.default.createElement(AdditionalProperties, {
285
+ schema: anyOneSchema,
286
+ schemaType: schemaType,
287
+ }),
278
288
  anyOneSchema.allOf &&
279
289
  react_1.default.createElement(SchemaNode, {
280
290
  schema: anyOneSchema,
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-1361",
4
+ "version": "0.0.0-1362",
5
5
  "license": "MIT",
6
6
  "keywords": [
7
7
  "openapi",
@@ -38,7 +38,7 @@
38
38
  "@types/postman-collection": "^3.5.11",
39
39
  "@types/react-modal": "^3.16.3",
40
40
  "concurrently": "^10.0.3",
41
- "docusaurus-plugin-openapi-docs": "0.0.0-1361",
41
+ "docusaurus-plugin-openapi-docs": "0.0.0-1362",
42
42
  "docusaurus-plugin-sass": "^0.2.6",
43
43
  "eslint-plugin-prettier": "^5.5.1"
44
44
  },
@@ -82,5 +82,5 @@
82
82
  "engines": {
83
83
  "node": ">=14"
84
84
  },
85
- "gitHead": "d8b8bac56886692cb3596e7c68dd17bf0f9eac65"
85
+ "gitHead": "a1937be849a314551043b0b8c8ad0ff7449a6d3d"
86
86
  }
@@ -236,6 +236,7 @@ const AnyOneOf: React.FC<SchemaProps> = ({
236
236
  {/* Handle empty object as a primitive type */}
237
237
  {anyOneSchema.type === "object" &&
238
238
  !anyOneSchema.properties &&
239
+ !anyOneSchema.additionalProperties &&
239
240
  !anyOneSchema.allOf &&
240
241
  !anyOneSchema.oneOf &&
241
242
  !anyOneSchema.anyOf && (
@@ -267,6 +268,17 @@ const AnyOneOf: React.FC<SchemaProps> = ({
267
268
  schemaPath={childSchemaPath}
268
269
  />
269
270
  )}
271
+ {/* Render a map variant's `additionalProperties` */}
272
+ {(anyOneSchema.type === "object" || !anyOneSchema.type) &&
273
+ anyOneSchema.additionalProperties &&
274
+ !anyOneSchema.oneOf &&
275
+ !anyOneSchema.anyOf &&
276
+ !anyOneSchema.allOf && (
277
+ <AdditionalProperties
278
+ schema={anyOneSchema}
279
+ schemaType={schemaType}
280
+ />
281
+ )}
270
282
  {anyOneSchema.allOf && (
271
283
  <SchemaNode
272
284
  schema={anyOneSchema}
@@ -1265,8 +1277,7 @@ const SchemaNode: React.FC<SchemaProps> = ({
1265
1277
  export default SchemaNode;
1266
1278
 
1267
1279
  type PrimitiveSchemaType =
1268
- | Exclude<NonNullable<SchemaObject["type"]>, "object" | "array">
1269
- | "null";
1280
+ Exclude<NonNullable<SchemaObject["type"]>, "object" | "array"> | "null";
1270
1281
 
1271
1282
  const PRIMITIVE_TYPES: Record<PrimitiveSchemaType, true> = {
1272
1283
  string: true,