UNPKG

@api-helper/core

Version:

根据 Swagger 的接口定义生成 TypeScript/JavaScript 的接口类型及其请求函数代码。

10 lines (9 loc) 901 B
import type { APIHelper, ReturnType } from './lib/types'; import * as utils from './lib/utils'; import ParserYapi from './lib/parser/parser-yapi'; import ParserSwagger from './lib/parser/parser-swagger'; import { PrettierOptions, FormatCodeConfig } from './lib/interface'; import { isSchemaObject, getErrorMessage, isSchemaPrimitiveValue, filterSchemaRoot, filterSchemaRequired, filterSchemaPrimitiveValue, randomChar } from './lib/utils/util'; import { getSchema, createDocument, createCategory, createApi, createSchema, transformType } from './lib/helpers'; export type { APIHelper, ReturnType, FormatCodeConfig, }; export { utils, getSchema, ParserYapi, ParserSwagger, isSchemaObject, getErrorMessage, createDocument, createCategory, randomChar, createApi, createSchema, transformType, isSchemaPrimitiveValue, filterSchemaPrimitiveValue, filterSchemaRoot, filterSchemaRequired, PrettierOptions, };