openapi-schema-to-json-schema:由于OpenAPI v3.0和JSON Schema的差异,您可以使用此JS库将OpenAPI Schema对象转换为正确的JSON Schema

时间:2021-05-02 13:46:07
【文件属性】:
文件名称:openapi-schema-to-json-schema:由于OpenAPI v3.0和JSON Schema的差异,您可以使用此JS库将OpenAPI Schema对象转换为正确的JSON Schema
文件大小:85KB
文件格式:ZIP
更新时间:2021-05-02 13:46:07
JavaScript 从OpenAPI架构到JSON架构 一个小的NodeJS包,用于将OpenAPI架构对象或参数对象转换为JSON架构。 当前从转换为 。 为什么? OpenAPI是用于描述RESTful API的规范。 OpenAPI v3.0允许我们详细描述请求和响应有效负载的结构。 从理论上讲,这意味着我们应该能够自动验证请求和响应有效负载。 但是,在撰写本文时,周围没有很多验证器。 好消息是,有许多用于不同语言的JSON模式验证器。 坏消息是OpenAPI v3.0。 OpenAPI v3.0的Schema对象是JSON Schema Specification Wright Draft 00的扩展子集,但有所不同。 这将在OpenAPI v3.1中解决,但在此之前……此工具将填补这一空白。 还有一个用于根据整个API规范创建模式的JSON。 如果需要反向转换,请签出 。 特征 将Open
【文件预览】:
openapi-schema-to-json-schema-master
----.github()
--------workflows()
----.eslintrc.js(285B)
----lib()
--------utils()
--------convert.js(209B)
--------converters()
--------errors()
----test()
--------invalid_types.test.js(2KB)
--------helpers.js(220B)
--------numeric_types.test.js(8KB)
--------properties.test.js(4KB)
--------clone_schema.test.js(2KB)
--------complex_schemas.test.js(692B)
--------items.test.js(949B)
--------combination_keywords.test.js(5KB)
--------nullable.test.js(1KB)
--------converters.test.js(396B)
--------parameter.test.js(4KB)
--------schemas()
--------pattern_properties.test.js(9KB)
--------combiners.test.js(868B)
--------string_types.test.js(2KB)
--------readonly_writeonly.test.js(6KB)
--------unsupported_properties.test.js(5KB)
----README.md(7KB)
----index.d.ts(872B)
----.editorconfig(173B)
----.gitignore(24B)
----index.js(2KB)
----package-lock.json(290KB)
----package.json(878B)

网友评论