2

I'm using swagger to define my API and API-gateway to host this API. I found the following lib (see here) to import my API definition to AWS and automatically create the API (models, end-points, etc). It's cool. But, it's not able to validate Requests based on models (defined in Swagger definition). It means that you can send a JSON payload without the required fields.

I don't want to write a node.JS code to check the format because it will not be much easy for schema updates. I'm wondering if it's possible to check if a JSON payload is compatible with a specific type of object defined in swagger (objects defined in the "definitions" section).

If it's possible, it will allow me to only update my swagger definition.

Thanks, Romain.

1 Answer 1

2

We are tracking this feature request on our backlog. For clarity, this would be implemented in the API Gateway service, not the Swagger importer. In the meantime you will need to implement validation logic yourself. See here for libraries which may help: http://json-schema.org/implementations.html

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.