restish icon indicating copy to clipboard operation
restish copied to clipboard

Validate application/json schema

Open jerome-jutteau opened this issue 3 years ago • 0 comments

Hi!

I would like Restish to be able to validate my application/json schema so it can trigger at least an error when an unknown parameter is provided before making any API call.

As an example: DryRun boolean or SomeObject object would be validated but not SomeObjet (which is a typo).

  /MyObject:
    post:
      operationId: CreateMyObject
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateMyObjectRequest'
[...]
    CreateMyObjectRequest:
      additionalProperties: false
      properties:
        DryRun:
          type: boolean
        SomeObject:
          $ref: '#/components/schemas/SomeObject'
      type: object
[...]

What do you think of this feature?

jerome-jutteau avatar May 06 '22 12:05 jerome-jutteau