Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

parsec-codegen

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

parsec-codegen

根据openapi生成代码

  • 1.0.0
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

parsec-codegen

根据 openapi.json 生成接口代码,推荐配合 useRequest 一起使用。

安装

yarn add parsec-codegen -D

配置

在项目根目录新建 parsec.config.json 文件, openapi 填入 openapi.jsonurl 地址:

{
  "openapi": "http://mock.scutum.alpha.lyd.parsec.com.cn/openapi.json"
}

生成代码

输入命令:

parsec-codegen

生成的目录如下:

├── configs
│   ├── codegen
│   │   ├── api.ts
│   │   ├── base.ts
│   │   ├── configuration.ts
│   │   ├── git_push.sh
│   │   └── index.ts

codegen/index.ts 会导出 DefaultApixxx 等构造方法,初始化后即可使用。

FAQs

Package last updated on 14 Sep 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc