-
-
Notifications
You must be signed in to change notification settings - Fork 409
Open
Description
According to the swagger specification, request bodies are optional by default, i.e. if the required
field doesn't exist, it should be inferred as false
.
From my limited knowledge of the code, this seems to be doing the opposite, causing any requestBody
without the required
parameter to be inferred as required, even though it should not be.
swagger-typescript-api/src/schema-routes/schema-routes.js
Lines 626 to 628 in 4d48d20
required: | |
requestBody && | |
(typeof requestBody.required === "undefined" || !!requestBody.required), |
Metadata
Metadata
Assignees
Labels
No labels