https://github.com/guocaoyi/qapi
QApi is a TypeScript definitions generator, 📃 based on OpenAPI(Swagger)!
https://github.com/guocaoyi/qapi
api api-client openapi swagger-api typescript-definitions yapi-plugin
Last synced: 3 months ago
JSON representation
QApi is a TypeScript definitions generator, 📃 based on OpenAPI(Swagger)!
- Host: GitHub
- URL: https://github.com/guocaoyi/qapi
- Owner: guocaoyi
- License: apache-2.0
- Created: 2022-02-14T08:15:05.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-09-14T11:06:38.000Z (almost 3 years ago)
- Last Synced: 2025-02-14T01:47:58.580Z (5 months ago)
- Topics: api, api-client, openapi, swagger-api, typescript-definitions, yapi-plugin
- Language: TypeScript
- Homepage: https://qapi.js.org
- Size: 82 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# QAPI
QAPI 通过解析 BFF 项目接口编译生成的的 Swagger.json ,直接生成业务 API(方法名、Http Method、URL、Params、Query、Body);
## Features
```bash
.
├── README.md
├── packages
│ ├── create-qapi #
│ ├── qapi-core # core 核心代码
│ ├── qapi-playground # qapi 在线转换器
│ └── yapi-plugin-typegen # yapi 插件
├── CONTRIBUTING.md # for contribution
└── tsconfig.json
```## QAPI Core
## QAPI CLI
```bash
Generate API from Swagger OpenAPI specsUsage
$ qapi [input] [options]Options
--help help inofs--parse
--publish
--push--npmServer npm register
--npmScope npm Scope e.g. @xxx/pack
--npmUser npm user
--npmPassword npm password--docPublish
--docisGroupExist
```- json | yaml -> api source
- api source -> npm package## QAPI Server
```bash
npm start
npm stop
```