Response-schema-validators

Hi,

With request-schema-validators you can specify your request schema which is great

request:
  schema:
    application/json: ${file(create_request.json)}

Is a similar feature for responses being developed? so we could do something like this:

response:
  - 200
    schema:
      application/json: ${file(success_request.json)}
  - 400
    schema:
      application/json: ${file(bad_request.json)}
2 Likes

I am also wondering this

Me too. This is really useful so I can later export an OpenAPI definition of my API including responses.

Have you looked at using the serverless-reqvalidator-plugin for the response schema validation? It does have that capability.