1.0.4 • Published 1 year ago
@brickmate/api-mapper v1.0.4
BRICKMATE GROUP - API MAPPER
Description
This package is writen for help developer generate api map in table format.
It is used for develop environment only and use with NestJS only.
When you update source code, it will generate instantly.
Developer can copy result and paste to notion.
Requirements
get-function-location
NestJS
Disable webpack in nest-cli.json
{ ... "compilerOptions": { "webpack": false } }
How to use
- Install package
npm i --save-dev get-function-location @brickmate/api-mapper
Emplement
Edit file
src/main.ts
import { BMGApiMapper } from '@brickmate/api-mapper';
async function bootstrap() {
...
if (process.env.NODE_ENV === 'development') {
...
await BMGApiMapper.scanApi(app);
}
...
}
- Get report in table format
http://localhost:3000/api-document-html
- Get detail in JSON
http://localhost:3000/api-document-json
Author
Jack Tran BMG