You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(parameter.enum ? ' (This can only be one of '+parameter.enum+')' : '');
},
I believe this changes should fix it:
const enum = parameter.enum ?? parameter.schema?.enum;
return (parameter.required ? '(Required) ' : '') + (parameter.description || '') +
(enum ? ' (This can only be one of ' + enum + ')' : '');
There's also a more minor issue that if the parameter description is empty, but the other two parts aren't, there are two spaces between (Required) and (This can only be...).
When debugging, I see lib/schemaUtils.js being hit, and not the equivalent in libV2/schemaUtils.js
@sahalbelam No, why? It just means that a request/response passing something else is invalid, the language used in the OpenAPI client/server doesn't matter.
Uh oh!
There was an error while loading. Please reload this page.
In OpenAPI/Swagger 2.0, enum parameters are described using
In 3.0, it should be
and the 2.0 style description fails to validate.
But the converter only supports the first option:
openapi-to-postman/lib/schemaUtils.js
Lines 478 to 484 in 34f299e
I believe this changes should fix it:
There's also a more minor issue that if the parameter description is empty, but the other two parts aren't, there are two spaces between
(Required)
and(This can only be...)
.When debugging, I see
lib/schemaUtils.js
being hit, and not the equivalent inlibV2/schemaUtils.js
openapi-to-postman/libV2/schemaUtils.js
Lines 911 to 918 in 34f299e
The text was updated successfully, but these errors were encountered: