Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZMS-126 #639

Merged
merged 2 commits into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions .ncurc.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ module.exports = {

// esm only
'chai',
'unixcrypt',

// temporary
'joi'
'unixcrypt'
]
};
6 changes: 4 additions & 2 deletions api.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,10 @@ const settingsRoutes = require('./lib/api/settings');
const healthRoutes = require('./lib/api/health');
const { SettingsHandler } = require('./lib/settings-handler');

const restifyApiGenerate = require('restifyapigenerate');
const { RestifyApiGenerate } = require('restifyapigenerate');
const Joi = require('joi');
const restifyApiGenerateConfig = require('./config/apigeneration.json');
const restifyApiGenerate = new RestifyApiGenerate(Joi, __dirname);

let userHandler;
let mailboxHandler;
Expand Down Expand Up @@ -578,7 +580,7 @@ module.exports = done => {
);
}

server.pre(restifyApiGenerate(server, restifyApiGenerateConfig));
server.pre(restifyApiGenerate.restifyApiGenerate(server, restifyApiGenerateConfig));

server.on('error', err => {
if (!started) {
Expand Down
2 changes: 1 addition & 1 deletion config/apigeneration.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,5 @@
}
},
"security": [{ "AccessTokenAuth": [] }],
"docsPath": "/../../openapidocs.json"
"docsPath": "/openapidocs.json"
}
11 changes: 4 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
"restify-cors-middleware2": "2.2.1",
"restify-errors": "8.0.2",
"restify-logger": "2.0.1",
"restifyapigenerate": "1.1.0",
"restifyapigenerate": "1.2.0",
"search-string": "3.1.0",
"seq-index": "1.1.0",
"smtp-server": "3.13.2",
Expand Down