fi-ksi / web-backend-swagger

A swagger proxy for backend

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Web Backend Swagger Proxy

A proxy for web-backend with added /swagger/swagger.json and reqeust parameter type verification.

Based upon TypeScript OpenAPI.

Installation

git clone https://github.com/fi-ksi/web-backend-swagger.git &&
cd web-backend-swagger &&
npm install 

Running

# to generate swagger.json file
npm run gen.api
# to start proxy server with latest endpoint config
npm run serve.dev

The backend will then proxy all request to http://localhost:3030.

Code structure

  • All endpoint definitions are placed under src/endpoint/
  • All model definitions are placed under src/model/

The src/util directory holds functions and classes for proxying requests to the real backend and for masking authentication (which is also handled by the real backend).

About

A swagger proxy for backend

License:GNU General Public License v3.0


Languages

Language:TypeScript 99.1%Language:JavaScript 0.9%