Serverless Programming Cookbook
上QQ阅读APP看书,第一时间看更新

How it works...

In this recipe, we added a model based on the JSON schema for our input message format. To use the model to reject payloads that do not conform to our format, we did the following:

  1. We specified all of the fields that are required (this is optional)
  2. We created a validator and assigned it to this method