-
Notifications
You must be signed in to change notification settings - Fork 38
Open
Description
When I try to convert the API Blueprint docs to Open API v3.0, the script fails.
cat apiary.apib | npx apib2swagger --yaml --open-api-3 > swagger.yaml
TypeError: Cannot read properties of undefined (reading 'value')
at setResponseSchema (/Users/userme/.npm/_npx/b8304055354efd5a/node_modules/apib2swagger/src/responses.js:92:28)
at module.exports.processResponses (/Users/userme/.npm/_npx/b8304055354efd5a/node_modules/apib2swagger/src/responses.js:181:29)
at swaggerOperation (/Users/userme/.npm/_npx/b8304055354efd5a/node_modules/apib2swagger/index.js:160:22)
at swaggerPaths (/Users/userme/.npm/_npx/b8304055354efd5a/node_modules/apib2swagger/index.js:148:60)
at /Users/userme/.npm/_npx/b8304055354efd5a/node_modules/apib2swagger/index.js:71:17
at Array.forEach (<anonymous>)
at /Users/userme/.npm/_npx/b8304055354efd5a/node_modules/apib2swagger/index.js:62:26
at Array.forEach (<anonymous>)
at module.exports.convertParsed (/Users/userme/.npm/_npx/b8304055354efd5a/node_modules/apib2swagger/index.js:57:8)
at exports.convert (/Users/userme/.npm/_npx/b8304055354efd5a/node_modules/apib2swagger/index.js:200:23)
When I run the script without the --open-api-3 flag, the file is converted, but IDE indicates "Property 'oneOf' is not allowed" errors and the official SwaggerEditor detects problems for all the nullable - 'null' properties. I guess the problem could be caused by the nullable values which are not handled properly.
Generated Open API v2.0:
homeAddress:
oneOf:
- $ref: '#/definitions/Address'
description: homeAddress, response only
- type: 'null'
The source document has more than 1300 lines and is private so I cannot post it. It is valid according the API blueprint specs.
Metadata
Metadata
Assignees
Labels
No labels