Skip to content

Validate application/json schema #123

@jerome-jutteau

Description

@jerome-jutteau

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions