New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

api-gensdk

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

api-gensdk

[![NPM version][npm-image]][npm-url] [![build status][travis-image]][travis-url] [![Test coverage][codecov-image]][codecov-url] [![David deps][david-image]][david-url] [![Known Vulnerabilities][snyk-image]][snyk-url] [![npm download][download-image]][down

0.1.8
Version published
Weekly downloads
7
-82.93%
Maintainers
1
Weekly downloads
 
Created

api-gensdk

NPM version build status Test coverage David deps Known Vulnerabilities npm download

Quick View

export interface RouteMetadataType {
  /** 类名 */
  className: string;
  /** 方法名 */
  functionName: string;
  /** 路由名称 */
  name: string;
  /** 路由描述 */
  description: string;
  /** http method */
  method: string;
  /** http url */
  url: string;
  /** 参数定义 */
  params: {
    /** 函数参数名 */
    name: string,
    /** 请求参数名 */
    paramName: string,
    /** 类型 */
    type: string,
  }[];
}

export class GenConfig {
  /** 生成目录 */
  sdkDir: string;
  /** 模版目录 */
  templatePath: string;
  /** filename style */
  camelCase?: boolean = false;
  /** gen type */
  type?: 'ts' | 'js' = 'ts';
}

genAPISDK

function genAPISDK(data: RouteMetadataType[], config: GenConfig) => void

FAQs

Package last updated on 11 Oct 2018

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