Type: String
Default value: './rest'
A string value that defines the path to the rest API folder.
Type: String
A string value that defines the root directory (__dirname).
Type: String
Default value: Api mock server
A string value that defines the title.
Type: Number
Default value: 1
A number value that defines the Rest API version.
Type: String
Default value: http://localhost:3001
A string value that defines the mock Rest API url.
Type: String
Default value: /rest/v1
A string value that defines the path for the mock Rest API.
Type: Number
Default value: 3001
A number value that defines the application port.
Type: string
Default value: /
A string value that defines the path for the node-mock-server UI.
Type: String
A string value that defines the path to the private key for ssl.
Type: String
A string value that defines the path to the ssl certificate.
Type: String|Array
Optional
A string or array that define the location of the response functions.
Type: Object
Default value: {}
A object that define the global response headers. Will add the given headers to all responses.
Type: String
Default value: application/json
A string that define the header "Content-Type".
Type: String
or function
Default value: X-Total-Count
A string that define the header "Access-Control-Expose-Headers". If a function is used, it will be called with the request object as the only parameter.
Type: String
or function
Default value: *
A string that define the header "Access-Control-Allow-Origin". If a function is used, it will be called with the request object as the only parameter.
Type: String
or function
Default value: GET, POST, PUT, OPTIONS, DELETE, PATCH, HEAD
A string that define the header "Access-Control-Allow-Methods". If a function is used, it will be called with the request object as the only parameter.
Type: String
or function
Default value: origin, x-requested-with, content-type
A string that define the header "Access-Control-Allow-Headers". If a function is used, it will be called with the request object as the only parameter.
Type: String
or function
Default value: true
A string that define the header "Access-Control-Allow-Credentials". If a function is used, it will be called with the request object as the only parameter.
Type: Object
Optional
A object including the middleware functions. Read middleware.md for details.
Type: Array<Function<Array<path: string, callback: Function>>>
Optional
A array of functions that returns the express app.use
arguments.
Read express middleware documentation for details.
examples:
expressMiddleware: [ function () { return ['/public', express.static('/public')]; } ]
expressMiddleware: [ function () { return ['/public', function (req, res, next) {}]; } ]
expressMiddleware: [ function () { return [function (req, res, next) {}] } ]
expressMiddleware: [ function () { return function (req, res, next) {}; } ]
Type: Object
Optional
A object that define the swagger import.
Type: String
Default value: http
A string that used to define the protocol for the swagger import curl.
Type: String
Optional
A string that define the basic auth user for the swagger import curl.
Type: String
Optional
A string that define the basic auth password for the swagger import curl.
Type: String
Required
A string that define the host for the swagger import curl.
Type: String
Default value: 80
A string that define the port for the swagger import curl.
Type: String
Default value: ``
A string that define the path for the swagger import curl.
Type: Boolean
Default value: false
A flag that toggles whether the swagger file should be treated as a YAML file (otherwise: JSON).
Type: String
Required
A string that defines the destination path for the swagger import.
Type: String
Default value: ``
A string that defines the part of the swagger imported methods path which should be removed.
Type: Boolean
Default value: true
A boolean to decide to create an expected response error file or not.
Type: Boolean
Default value: true
A boolean to decide to create an expected response empty file or not.
Type: Boolean
Default value: true
A boolean to decide to replace an old description with the new (imported) description or not.
Type: String
A string that defines the location of the imported response functions.
Type: HttpProxyAgent|HttpsProxyAgent
Optional
An agent to reach a swagger url outside a corporate proxy.
Type: String
Optional
A string that define the path to the custom DTO to class template. template
Type: Boolean
Optional
A boolean to decide to open the UI after start or not.
Type: String
Optional
A string that defines and enables the options fallback. This allows you to define a fallback for every options call except there is one defined for the affected endpoint.