JSPM

  • Created
  • Published
  • Downloads 693
  • Score
    100M100P100Q89322F
  • License MIT

swagger auto generate typescript service.ts

Package Exports

  • swagger-typescript

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (swagger-typescript) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

NPM

install size dependencies

url

node ./node_modules/swagger-typescript/lib/index.js url='http://example.com'

dir

node ./node_modules/swagger-typescript/lib/index.js url='http://example.com' dir='./services'

responseWrapper

for customize responseWrapper your can do something like this

export type SwaggerResponse<R> = R;

async function responseWrapper(
  response: AxiosResponse<any>,
): Promise<SwaggerResponse<any>> {
  return response.data;
}
``