timplan:hapi 的 JSONSchema 验证

时间:2021-06-15 16:22:57
【文件属性】:
文件名称:timplan:hapi 的 JSONSchema 验证
文件大小:6KB
文件格式:ZIP
更新时间:2021-06-15 16:22:57
JavaScript Timplan - hapi 的 JSONSchema 验证 Timplan 允许您使用 JSON 模式而不是 hapi 中的 joi。 仍然可以使用 hapi 进行验证。 因此,一种可能的策略是让路径和查询参数验证保留在 joi 中,但将模式用于有效负载和响应。 例子 var lib = { hapi : require ( 'hapi' ) , timplan : require ( 'timplan' ) } ; // Set up a validator var validator = new lib . timplan . Validator ( { baseUrl : 'http://api.bloglovin.se/schemas/' , schemaDir : './schemas' } ) ; // Add the schemas that we wil
【文件预览】:
timplan-master
----.jshintrc(32B)
----Gruntfile.js(147B)
----lib()
--------coercions.js(913B)
----README.md(1KB)
----.jscsrc(30B)
----.editorconfig(36B)
----.gitignore(14B)
----index.js(5KB)
----CHANGELOG.md(1KB)
----package.json(969B)

网友评论