本文介绍了使用 Postman 进行模式验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的回复如下所示:-
{ "Header": { "MessageId": "11", "From": "user1 (user2@domain1)", "To": ["user2 (user1@domain2)"], "Cc": [], "Bcc": [], "Subject": "FW: Send a mail with normal text file base64 encoded", "BodyText": "Me to Me concept super",, "Direction": 2, "SystemDateTime": "2004-10-10T10:55:03.487", "InstanceId": "tecf32af-db97-49eb-a3e3-73952c923401", "HasAttachment": false }, "Attachments": [] }我想知道如何使用邮递员工具验证我的响应模式
I want to know how to validate the schema of my response using the postman tool
推荐答案使用 Postman 沙箱中提供的 tv4 对 JSON 响应进行模式验证.在 邮递员提示 4.
Use tv4 available in the Postman sandbox to do schema validation of the JSON response. Read more at Postman Tip 4.
如果您没有为您的响应定义 JSON 模式,您可以手动编写一个,或者使用在线提供的众多工具之一根据您拥有的响应生成一个来生成 JSON 模式.
If you do not have a JSON Schema defined for your response, you can write one by hand, or generate one based on the response you have using one of the many tools available online to generate JSON schemas.
更多推荐
使用 Postman 进行模式验证
发布评论