Skip to content

feat: Validate request option in Mock mode #2695

@thim81

Description

@thim81

User Story Description

As a Prism user,

I want to be able to define the option to bypass the request validation and just return the mocked response,

so I can showcase a response even when then the request is invalid, which is usefull for a demo mode.

Now, it seems that it is not possible circumvent the request validation, it is always triggered.
Returning validation errors instead of the response.

example:
[5:34:12 PM] › [VALIDATOR] ✖ error Violation: request.body Request body must have required property 'ticketDate'

Response

{
    "type": "object",
    "title": "Validation failed"
}

The same logic that would apply for the Proxy CLI --validate-request

Acceptance Criteria

  • Have the option to toggle the request validation off/on
  • When the request validation is off, the response is returned, even with invalid input

Sprint Ready Checklist

  • Acceptance criteria defined
  • Team understands acceptance criteria
  • Team has defined solution / steps to satisfy acceptance criteria
  • Acceptance criteria is verifiable / testable
  • External / 3rd Party dependencies identified

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