Skip to content

Request body not marked as optional by default #897

@caoimhebyrne

Description

@caoimhebyrne

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.

required:
requestBody &&
(typeof requestBody.required === "undefined" || !!requestBody.required),

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions