diff --git a/cds-plugin-openapi/index.js b/cds-plugin-openapi/index.js index 1ac184ed9..234bdf19e 100644 --- a/cds-plugin-openapi/index.js +++ b/cds-plugin-openapi/index.js @@ -18,11 +18,6 @@ module.exports.activate = () => { applyTaskDefaults(task) { task.src = task.src || cds.env.folders.srv.replace(/\/$/, '') } - async lookupTasks() { - if (process.env.NODE_ENV === 'production') { - return [{ for: this.id }] - } - } get handler() { return class extends BuildTaskHandler { async clean() { @@ -46,6 +41,16 @@ module.exports.activate = () => { } } } + /** + * Additional constraints can be defined, e.g. generate openapi service specification in production builds only. + * > cds build --production + * > cds build --for node-cf --production + */ + // async lookupTasks() { + // if (process.env.NODE_ENV === 'production') { + // return [{ for: this.id }] + // } + // } })() ) } \ No newline at end of file