Skip to content

Move `apidocspath` keys in `service-config` under routes section

Is this a BUG REPORT or FEATURE REQUEST?

This is not a bug. It is more of a readability enhancement suggestion

What happened

In service-config.js file, the config looks like below

api: {
    enabled: true,
    API_TIMEOUT: 60 * 1000 // In miliseconds
  },
  apiDocsPath: {
    postmanSpecPath: `${process.cwd()}/`,
    swaggerSpecPath: `${process.cwd()}/`
  },
  routes: {
    enabled: true,
    routeFolderPath: path.join(__dirname, '../routes')
  },

routes section registers REST end-points with express and also used to generate swagger specs and postman scripts. apiDocsPath specifies the location to save these generated swagger specs and postman script.

What you expected to happen

A more more readable configuration setup could be

api: {
    enabled: true,
    API_TIMEOUT: 60 * 1000 // In miliseconds
  },
  routes: {
    enabled: true,
    routeFolderPath: path.join(__dirname, '../routes'),
    postmanSpecPath: `${process.cwd()}/`,
    swaggerSpecPath: `${process.cwd()}/`
  },

How to reproduce it (as minimally and precisely as possible)

Not applicable

Anything else we need to know?

Not applicable

Environment

  • Apifie nodejs blueprint version: 1.0.1
  • NodeJS version (node -v): 8.9.0
  • npm version (npm -v): 6.4.1
  • Others: NA
Edited by Gaurav Kumar
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information