1.0.4 • Published 1 year ago

@brickmate/api-mapper v1.0.4

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

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

  1. Install package
npm i --save-dev get-function-location @brickmate/api-mapper
  1. 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);
    
  }

  ...
}
  1. Get report in table format
http://localhost:3000/api-document-html

Table format

  1. Get detail in JSON
http://localhost:3000/api-document-json

Json format

Author

Jack Tran BMG

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago