55 lines
1.6 KiB
TypeScript
Executable File
55 lines
1.6 KiB
TypeScript
Executable File
// for AdonisJS v6
|
|
import path from 'node:path'
|
|
import url from 'node:url'
|
|
// ---
|
|
|
|
export default {
|
|
// path: __dirname + "/../", for AdonisJS v5
|
|
path: path.dirname(url.fileURLToPath(import.meta.url)) + '/../', // for AdonisJS v6
|
|
title: 'Foo', // use info instead
|
|
version: '1.0.0', // use info instead
|
|
description: '', // use info instead
|
|
tagIndex: 2,
|
|
productionEnv: 'production', // optional
|
|
info: {
|
|
title: 'Crux',
|
|
version: '1.0.0',
|
|
description: '',
|
|
},
|
|
snakeCase: true,
|
|
|
|
debug: true, // set to true, to get some useful debug output
|
|
ignore: [
|
|
'/swagger',
|
|
'/docs',
|
|
'/auth*',
|
|
'/admin*',
|
|
'/permission*',
|
|
'/role*',
|
|
'/makeModule*',
|
|
'/testing*',
|
|
],
|
|
preferredPutPatch: 'PUT', // if PUT/PATCH are provided for the same route, prefer PUT
|
|
common: {
|
|
parameters: {}, // OpenAPI conform parameters that are commonly used
|
|
headers: {}, // OpenAPI conform headers that are commonly used
|
|
},
|
|
securitySchemes: {}, // optional
|
|
authMiddlewares: ['auth', 'auth:api'], // optional
|
|
defaultSecurityScheme: 'BearerAuth', // optional
|
|
persistAuthorization: true, // persist authorization between reloads on the swagger page
|
|
showFullPath: false, // the path displayed after endpoint summary,
|
|
// modulesPath: {
|
|
// models: ['models', 'api/models'],
|
|
// interfaces: ['interfaces', 'api/interfaces'],
|
|
// validators: ['validators', 'api/validators'],
|
|
// types: ['types', 'api/types'],
|
|
// },
|
|
modulesPath: {
|
|
models: ['api/models'],
|
|
interfaces: ['api/interfaces'],
|
|
validators: ['api/validators'],
|
|
types: ['api/types'],
|
|
},
|
|
}
|