使用 Postman 进行模式验证

编程入门 行业动态 更新时间:2024-10-24 08:20:24
本文介绍了使用 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 进行模式验证

本文发布于:2023-10-29 08:16:54,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1539187.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:模式   Postman

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!