0.1.39 • Published 3 years ago

openapi-generator v0.1.39

Weekly downloads
475
License
MIT
Repository
github
Last release
3 years ago

openapi-generator

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

Quick View

openapi-generator from swagger 2.0 or OpenAPI 3.0:

Simple

openapi-generator url http://xxx/v2/api-docs -c true

Use Config

openapi-generator config ./xxx.js or openapi-generator config ./xxx.json

Config interface:

interface CliConfig {
  api: string;

  /** dir for openapi-generator */
  sdkDir: string;
  /** path of service template */
  templatePath?: string;
  /** path of interface template */
  interfaceTemplatePath?: string;
  /** request lib */
  requestLib = true;
  /** filename style, true 为大驼峰,lower 为小驼峰 */
  camelCase?: boolean | 'lower' = false;
  /** gen type */
  type?: 'ts' | 'js' = 'ts';
  /** service type */
  serviceType?: 'function' | 'class' = 'function';
  /** namespace of typings */
  namespace?: string = 'API';
  /** 自动清除旧文件时忽略列表 */
  ignoreDelete: string[] = [];
}

genAPISDK

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

0.1.38

3 years ago

0.1.39

3 years ago

0.1.37

4 years ago

0.1.36

4 years ago

0.1.35

4 years ago

0.1.34

4 years ago

0.1.33

4 years ago

0.1.32

4 years ago

0.1.31

4 years ago

0.1.30

5 years ago

0.1.29

5 years ago

0.1.28

5 years ago

0.1.27

5 years ago

0.1.26

5 years ago

0.1.25

5 years ago

0.1.24

5 years ago

0.1.23

5 years ago

0.1.22

5 years ago

0.1.21

5 years ago

0.1.20

5 years ago

0.1.19

5 years ago

0.1.18

5 years ago

0.1.17

5 years ago

0.1.16

5 years ago

0.1.15

5 years ago

0.1.14

5 years ago

0.1.13

5 years ago

0.1.12

5 years ago

0.1.11

5 years ago

0.1.10

5 years ago

0.1.9

5 years ago

0.1.8

5 years ago

0.1.7

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago