openapi-jsonrpc-jsdoc 1.2.3 → 1.2.4

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.js +5 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -176,8 +176,12 @@ async function openapiJsonrpcJsdoc({ files, securitySchemes = {}, packageUrl, se
176
176
  break;
177
177
  }
178
178
  case 'enum': {
179
- type = 'string';
180
179
  enumData = parameter.type.names;
180
+ if (parameter.type.names.every(n => !Number.isNaN(Number(n)))) {
181
+ type = 'number';
182
+ } else {
183
+ type = 'string';
184
+ }
181
185
  break;
182
186
  }
183
187
  default: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openapi-jsonrpc-jsdoc",
3
- "version": "1.2.3",
3
+ "version": "1.2.4",
4
4
  "description": "Transform JSDoc-annotated JSON-RPC 2.0 methods into OpenAPI 3.0 specifications. Auto-generates REST API documentation with complete schemas, parameters, and endpoint definitions.",
5
5
  "main": "index.js",
6
6
  "scripts": {