Skip to content

Fix Request Body Validation Bug #27

Closed
@vijayseid

Description

@vijayseid

Hi @GavinChenYan @stevehu
Find a Bug on validating the Request body, could you please fix it.

OpenApiSpec has Mandatory field on request body, here is the piece of line added

RequestBody:
required:
- feature
type: object
properties:
billerDivisionId:
type: string
description: Division Id for account, same as spc division id
billerAccountNumber:
type: string
description: Account number in a billing system
soloAccountId:
type: string
description: Account Id in SOLO
feature:
type: string
description: 'Use case for which this token needs to be generated (example: enable-paperless-billing)'
description: Billing details

Scenario 0 : Positive - Works as expected

image

Scenario 1 : Negative - Works as expected

If I Skip the field feature, I got the perfect validation says this field is required & it's missed.

image

Scenario 2 : Negative - Failed to pass

If I Skip the entire Request body(not passing any body), I Didn't get any validation error, & validation was successful. It should throw the same as scenario 1.

image

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