简体   繁体   English

Postman 正在使用 json 模式的验证器

[英]Postman is using which validator for json schema

I am trying to understand the postman environment that is used for json schema validation.我试图了解用于 json 模式验证的 postman 环境。 If I write the tests as shown below.如果我编写如下所示的测试。 the first test I am using the AJV validator.第一个测试我使用的是 AJV 验证器。

And on second test, i dont know what is the validator being used.在第二次测试中,我不知道使用的是什么验证器。 Can please some explain how the second test works specifically what validator is being used in this case?请解释一下第二个测试是如何工作的,特别是在这种情况下使用了什么验证器?

Thanks.谢谢。

I am using Postman v6.7.4.我正在使用 Postman v6.7.4。

邮递员中的模式测试

It's using Ajv in both cases here.它在这两种情况下都使用 Ajv。 The Postman helper is using that module internally to validate. Postman 助手在内部使用该模块进行验证。

You could also place those or any other options as a second argument in the jsonschema helper function.您还可以将这些或任何其他选项作为第二个参数放在 jsonschema 帮助器 function 中。

https://learning.postman.com/docs/writing-scripts/script-references/test-examples/#validating-response-structure https://learning.postman.com/docs/writing-scripts/script-references/test-examples/#validating-response-structure

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM