燕麦:openapi3规范中的打字稿

时间:2021-02-23 11:03:53
【文件属性】:
文件名称:燕麦:openapi3规范中的打字稿
文件大小:116KB
文件格式:ZIP
更新时间:2021-02-23 11:03:53
TypeScript 燕麦 Oats是使用OpenAPI 3规范的TypeScript客户端和服务器的生成器。 有关燕麦为什么会出现的更多背景信息以及使用它的更具描述性的方法,请查看我们的博客文章: ://medium.com/smartly-io/oats-how-we-learned-to-stop 该软件包提供了用于生成类型定义的工具。 一个单独的程序包提供了,其中包含实际使用生成的定义所需的代码和基本类型。 生成类型定义 Oats公开driver.generate用于配置和运行生成器的driver.generate 。 作为示例,我们从example.yaml中的api规范生成客户端和服务器定义,该规范使用common.yaml定义的其他组件架构。 // yarn ts-node examples/driver.ts import { driver , util } from '../ind
【文件预览】:
oats-master
----.gitignore(114B)
----tsconfig.json(528B)
----README.md(8KB)
----render.ts(1KB)
----.github()
--------workflows()
----test()
--------transitive.yml(210B)
--------optional-queries()
--------example-with-security-nodes.yaml(2KB)
--------common.yaml(2KB)
--------codegen.spec.ts(2KB)
--------example.yaml(3KB)
----.prettierrc(126B)
----.vscode()
--------launch.json(606B)
--------settings.json(56B)
----examples()
--------server.ts(2KB)
--------client.ts(1KB)
--------driver.ts(1KB)
----LICENSE(1KB)
----.eslintrc(2KB)
----package.json(3KB)
----README.template.md(4KB)
----src()
--------util.ts(3KB)
--------generate-types.ts(50KB)
--------driver.ts(6KB)
--------generate-server.ts(13KB)
----renovate.json(874B)
----index.ts(102B)
----.eslintignore(71B)
----.npmignore(209B)
----.editorconfig(151B)
----yarn.lock(217KB)

网友评论