UNPKG

@api-helper/core

Version:

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

15 lines (14 loc) 932 B
import * as utils from './lib/utils'; import ParserYapi from './lib/parser/parser-yapi'; import ParserSwagger from './lib/parser/parser-swagger'; import { PrettierOptions } 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'; if (typeof window === 'object' && window != null && !window.process) { window.process = { cwd: function () { return ''; } }; } export { utils, getSchema, ParserYapi, ParserSwagger, isSchemaObject, getErrorMessage, createDocument, createCategory, randomChar, createApi, createSchema, transformType, isSchemaPrimitiveValue, filterSchemaPrimitiveValue, filterSchemaRoot, filterSchemaRequired, PrettierOptions, };