docusaurus-plugin-openapi-docs 0.0.0-544 → 0.0.0-555

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.
@@ -397,7 +397,9 @@ function createDetailsNode(name, schemaName, schema, required) {
397
397
  children: " nullable",
398
398
  }),
399
399
  ]),
400
- (0, utils_1.guard)(schema.required && schema.required === true, () => [
400
+ (0, utils_1.guard)(Array.isArray(required)
401
+ ? required.includes(name)
402
+ : required === true, () => [
401
403
  (0, utils_1.create)("strong", {
402
404
  style: {
403
405
  fontSize: "var(--ifm-code-font-size)",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "docusaurus-plugin-openapi-docs",
3
3
  "description": "OpenAPI plugin for Docusaurus.",
4
- "version": "0.0.0-544",
4
+ "version": "0.0.0-555",
5
5
  "license": "MIT",
6
6
  "keywords": [
7
7
  "openapi",
@@ -68,5 +68,5 @@
68
68
  "engines": {
69
69
  "node": ">=14"
70
70
  },
71
- "gitHead": "bec22a82e0b0517a26d2f5db271bf62f74b8c733"
71
+ "gitHead": "f2dee980b0b02e2198d4173b6a1c08859c5fb6d1"
72
72
  }
@@ -466,15 +466,20 @@ function createDetailsNode(
466
466
  children: " nullable",
467
467
  }),
468
468
  ]),
469
- guard(schema.required && schema.required === true, () => [
470
- create("strong", {
471
- style: {
472
- fontSize: "var(--ifm-code-font-size)",
473
- color: "var(--openapi-required)",
474
- },
475
- children: " required",
476
- }),
477
- ]),
469
+ guard(
470
+ Array.isArray(required)
471
+ ? required.includes(name)
472
+ : required === true,
473
+ () => [
474
+ create("strong", {
475
+ style: {
476
+ fontSize: "var(--ifm-code-font-size)",
477
+ color: "var(--openapi-required)",
478
+ },
479
+ children: " required",
480
+ }),
481
+ ]
482
+ ),
478
483
  ],
479
484
  }),
480
485
  create("div", {