Should this automatically fill in the models in API Gateway? #73
|
I am trying to make sure that when someone uses my API point, I am checking for the types and failing the request if it does not match the models. I am under the impression that to achieve this, I need the models to be filled in on API Gateway and when I look at the request on API Gateway, it says that the resource Request Body and Response Body matches those models. What I am seeing when I deploy is the swagger ui is generated correctly with the models, but when I look at the resource and the models in API Gateway, I don't see this at all. Also, when I make a request with the wrong types, nothing happens. Have I understood what this tool does completely wrong, or is it possible I have not set it up correctly? Happy to share more details, but thought this would suffice as it is just theoretical. |
Replies: 1 comment 1 reply
|
This plugin currently doesn't support automatic populating of the API gateway models. It's designed just for the creation of the swagger file. If there isn't already, you could create a plugin to do exactly that. You could even clone this plugin and 'borrow' the typescript to schema/model bits we've done. Then you just add that new schema to the API gateway config . |
This plugin currently doesn't support automatic populating of the API gateway models. It's designed just for the creation of the swagger file.
If there isn't already, you could create a plugin to do exactly that. You could even clone this plugin and 'borrow' the typescript to schema/model bits we've done. Then you just add that new schema to the API gateway config .