Socket
Socket
Sign inDemoInstall

c2r

Package Overview
Dependencies
125
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    c2r

rap数据自动生成modelproxy格式文件


Version published
Maintainers
1
Created

Readme

Source

rap自动转换成接口方法

把rap接口文档平台,转换成元数据。利用接口元数据,可以高度定制化生成前端接口层代码,接口mock平台和接口测试平台。

命令行

c2r config

配置文件

{
	// rap的域名
	"rapPath": "http://rap.internal.baidu.com",
	// modelproxy的路径
	"mpPath": "../mp/proxy",
	// 模板路径
	"tempPath": "../temps/index.ts.art",
	// 需要配置的项目
    "products": [
        {
			// 项目id
			"productId": 111,
			// 命名空间
			"nameSpace": "Sale",
			// 生成文件的路径
			"path": "./apis",
			// modelproxy的默认配置
            "mpConfig": {
                "state": "qa",
                "states": {
                    "dev": "//scloud.baidudev.com",
                    "qa": "//m-scloud.baiduqa.com",
                    "prd": "//api.scloud.baidu.com"
                }
            }
        },
        {
            "productId": 106,
            "nameSpace": "Custom",
            "path": "./apis",
            "mpConfig": {
                "state": "qa",
                "states": {
                    "dev": "https://mapi.baidudev.com",
                    "qa": "https://mapi.baiduqa.com",
                    "prd": "https://mapi.baidu.com"
                }
            }
        }
    ]
}

Keywords

FAQs

Last updated on 13 May 2019

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc