如何从jsonschema6转换为jsonschema4
我一直在使用模块 https://www.npmjs.coms.com/package/package/package/json-schema < /a>并在jsonschema6
中具有用于验证的模式。是否有任何实用代码将jsonschema6
转换为jsonschema4
?我需要这个,因为AWS API Gateway仅支持JSonschema4
(根据 https://docs.aws.aws.amazon.com/apigateway/latest/developerguide/models-mappings.html#mappings.html#mappings-mappings-mappings-models )
I have been using the module https://www.npmjs.com/package/json-schema and have the schemas for validations in JSONSchema6
.I have read that JSONSchema6
is backward compatible with JSONSchema4
. Is there any utility code to convert JSONSchema6
to JSONSchema4
? I need this as AWS API Gateway supports only JSONSchema4
(as per https://docs.aws.amazon.com/apigateway/latest/developerguide/models-mappings.html#models-mappings-models)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
手工做或编写程序并不难,因为两个版本之间的差异很简单。它们在这里被列出: https://json-schema.org/specification.html向下链接,指向两个规范文档的4到6之间的差异)。
It's not difficult to do by hand, or write a program to do so, as the differences between the two versions are straightforward. They are itemized here: https://json-schema.org/specification.html (scroll down for the links to differences between 4 and 6 for the two specification documents).