Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
datahub-import-json
Advanced tools
[![NPM version][npm-image]][npm-url] [![Build status][travis-image]][travis-url] [![Coverage status][codecov-image]][codecov-url] [![Dependency status][daviddm-image]][daviddm-url]
Upload all files below the mock file to DataHub
$ npm i datahub-import-json -g
$ datahub-import-json test-project -d /Users/xxx/mock/get --method GET
$ datahub-import-json test-project -d /Users/xxx/mock/post --method POST
$ datahub-import-json projectName
param | description | default |
---|---|---|
-s | DataHub server address | http://127.0.0.1:5678 |
-d | mock data directory path | - |
--mockSuffix | set mock file suffix | .json |
--interfaceSuffix | DataHub interface suffix, will replace mockSuffix | .json |
--replacePathWithDynamic | replace path with dynamic, goods/:id.json | /_/ |
--mockRemoveSuffix | remove mockRemoveSuffix, no repalce | - |
--method | DataHub interface method | ALL |
假设项目名为:test-project(建议与仓库名称保持一致) mock 数据文件件路径为:/Users/xxx/mock DataHub server 地址为:http://127.0.0.1:5678/ 想导入的 Mock 文件后缀为:.json 导入后的 Mock 接口后缀为:.html
$ datahub-import-json test-project -d /Users/xxx/mock --interfaceSuffix .html -s http://127.0.0.1:5678
假设项目名为:test-project(建议与仓库名称保持一致) mock 数据文件件路径为:/Users/xxx/mock DataHub server 地址为:http://127.0.0.1:5678/ 想导入的 Mock 文件路径为: /Users/xxx/mock/post/member/xxx.html/data.json /Users/xxx/mock/post/member/xxx.html/data.js 导入后的 Mock 接口路径为:/member/xxx.html
# post 请求
$ datahub-import-json test-project -d /Users/xxx/mock/post/ --mockRemoveSuffix /data.json --method POST -s http://127.0.0.1:5678
# get 请求
$ datahub-import-json test-project -d /Users/xxx/mock/get/ --mockRemoveSuffix /data.json --method GET -s http://127.0.0.1:5678
FAQs
[![NPM version][npm-image]][npm-url] [![Build status][travis-image]][travis-url] [![Coverage status][codecov-image]][codecov-url] [![Dependency status][daviddm-image]][daviddm-url]
We found that datahub-import-json demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.