Skip to content

Only the first missing required field is returned in error message #1037

@briangweber

Description

@briangweber

Describe the bug
If multiple required fields are omitted from the request body, only the first is reported missing in the error message.

To Reproduce
Make an empty object PUT request to /pet with this defintion

paths: /pet: put: tags: - pet summary: Update an existing pet description: Update an existing pet by Id operationId: updatePet requestBody: description: Update an existent pet in the store content: application/json: schema: required: - name - color type: object properties: name: type: string example: doggie color: type: string example: brown 

Actual behavior
Error: must have required property 'name'

Expected behavior
Errors: must have required property 'name' and must have required property 'color'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions