@necessarylion/adonis-autoswagger 0.0.11 → 0.0.13

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.
@@ -367,8 +367,8 @@ class AutoSwagger {
367
367
  const schema = requestBody?.content?.["application/json"]?.schema?.["$ref"].split('/').pop();
368
368
  if (!schema)
369
369
  return [];
370
- const properties = this.schemas[schema].properties;
371
- const required = this.schemas[schema].required ?? [];
370
+ const properties = this.schemas[schema]?.properties ?? {};
371
+ const required = this.schemas[schema]?.required ?? [];
372
372
  const parameters = [];
373
373
  try {
374
374
  for (const key in properties) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@necessarylion/adonis-autoswagger",
3
- "version": "0.0.11",
3
+ "version": "0.0.13",
4
4
  "description": "Auto-Generate swagger docs for AdonisJS",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",