openapi-jsonrpc-jsdoc 1.4.0 → 1.4.1

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.
Files changed (2) hide show
  1. package/index.mjs +4 -2
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -238,8 +238,10 @@ export default async function openapiJsonrpcJsdoc({ files, securitySchemes = {},
238
238
  properties: {},
239
239
  },
240
240
  );
241
- const schemaPostJsdoc = schema.post.requestBody.content['application/json'].schema;
242
- schemaPostJsdoc.properties.params = propertiesParameters;
241
+ if (exampleJSON !== null) {
242
+ const schemaPostJsdoc = schema.post.requestBody.content['application/json'].schema;
243
+ schemaPostJsdoc.properties.params = propertiesParameters;
244
+ }
243
245
  }
244
246
  temporaryDocument.paths[`${api}${apiName}`] = schema;
245
247
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openapi-jsonrpc-jsdoc",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "description": "Transform JSDoc-annotated JSON-RPC 2.0 methods into OpenAPI specifications.",
5
5
  "main": "index.mjs",
6
6
  "type": "module",