
上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:
- We specified all of the fields that are required (this is optional)
- We created a validator and assigned it to this method