mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-05-13 13:10:53 +00:00
* Updated to new nodejs packages, depending heavily on express-openapi-validator. Requires quite a change in code. Updated the business-logic in the controllers/Controller.js file. Logger now records also timestamp of events. Files are uploaded according to definition in config.js file * Removed commented-out code; Changed openApi document extensions to suit new express-openapi-validator definition; multipart and file uploading is supported now; Automatic response returns the values the were sent in the request * fixed README documentation, fixed a mistage in package.json/mustache * added generated files that were created when running the ./bin/test file
16 lines
490 B
JavaScript
16 lines
490 B
JavaScript
const path = require('path');
|
|
|
|
const config = {
|
|
ROOT_DIR: __dirname,
|
|
URL_PORT: 3000,
|
|
URL_PATH: 'http://localhost',
|
|
BASE_VERSION: 'v2',
|
|
CONTROLLER_DIRECTORY: path.join(__dirname, 'controllers'),
|
|
PROJECT_DIR: __dirname,
|
|
};
|
|
config.OPENAPI_YAML = path.join(config.ROOT_DIR, 'api', 'openapi.yaml');
|
|
config.FULL_PATH = `${config.URL_PATH}:${config.URL_PORT}/${config.BASE_VERSION}`;
|
|
config.FILE_UPLOAD_PATH = path.join(config.PROJECT_DIR, 'uploaded_files');
|
|
|
|
module.exports = config;
|