docusaurus-theme-openapi-docs 0.0.0-998 → 0.0.0-999

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.
@@ -344,7 +344,8 @@ const DiscriminatorNode = ({ discriminator, schema, schemaType }) => {
344
344
  mergedSubSchema = mergeAllOf(subSchema);
345
345
  }
346
346
  const subProperties = subSchema.properties || mergedSubSchema.properties;
347
- if (subProperties[discriminator.propertyName]) {
347
+ // Add a safeguard check to avoid referencing subProperties if it's undefined
348
+ if (subProperties && subProperties[discriminator.propertyName]) {
348
349
  if (schema.properties) {
349
350
  schema.properties[discriminator.propertyName] = {
350
351
  ...schema.properties[discriminator.propertyName],
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-998",
4
+ "version": "0.0.0-999",
5
5
  "license": "MIT",
6
6
  "keywords": [
7
7
  "openapi",
@@ -36,7 +36,7 @@
36
36
  "@types/lodash": "^4.14.176",
37
37
  "@types/pako": "^2.0.3",
38
38
  "concurrently": "^5.2.0",
39
- "docusaurus-plugin-openapi-docs": "0.0.0-998",
39
+ "docusaurus-plugin-openapi-docs": "0.0.0-999",
40
40
  "docusaurus-plugin-sass": "^0.2.3",
41
41
  "eslint-plugin-prettier": "^5.0.1"
42
42
  },
@@ -79,5 +79,5 @@
79
79
  "engines": {
80
80
  "node": ">=14"
81
81
  },
82
- "gitHead": "5cb443ea0c67f1c41d7280f55fa8f85cae48c6e1"
82
+ "gitHead": "1b9d87542e44f9dc0edbf9d8664d395513940bbb"
83
83
  }
@@ -352,7 +352,8 @@ const DiscriminatorNode: React.FC<DiscriminatorNodeProps> = ({
352
352
  }
353
353
 
354
354
  const subProperties = subSchema.properties || mergedSubSchema.properties;
355
- if (subProperties[discriminator.propertyName]) {
355
+ // Add a safeguard check to avoid referencing subProperties if it's undefined
356
+ if (subProperties && subProperties[discriminator.propertyName]) {
356
357
  if (schema.properties) {
357
358
  schema.properties![discriminator.propertyName] = {
358
359
  ...schema.properties![discriminator.propertyName],