Skip to content

Commit

Permalink
fix(api-endpoints): public_get and acme endpoints excluded from api d…
Browse files Browse the repository at this point in the history
…ocs generation ZMS-156 (#688)

* Added submission api endpoint to api docs generation

* exclude some acme and public endpoins from api docs generation

* rename exclude to excludeRoute
  • Loading branch information
NickOvt authored May 9, 2024
1 parent 490b4e5 commit cc832b2
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion api.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ server.use(

// public files
server.get(
{ name: 'public_get', path: '/public/*' },
{ name: 'public_get', path: '/public/*', excludeRoute: true },
restify.plugins.serveStatic({
directory: Path.join(__dirname, 'public'),
default: 'index.html'
Expand Down
2 changes: 1 addition & 1 deletion lib/api/acme.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module.exports = (db, server, routeOptions) => {
const acmeChallenge = AcmeChallenge.create({ db: db.database });

server.get(
{ name: 'acmeToken', path: '/.well-known/acme-challenge/:token' },
{ name: 'acmeToken', path: '/.well-known/acme-challenge/:token', excludeRoute: true },
responseWrapper(async (req, res) => {
res.charSet('utf-8');

Expand Down
8 changes: 4 additions & 4 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 @@ -96,7 +96,7 @@
"restify-cors-middleware2": "2.2.1",
"restify-errors": "8.0.2",
"restify-logger": "2.0.1",
"restifyapigenerate": "1.2.0",
"restifyapigenerate": "1.2.1",
"search-string": "3.1.0",
"seq-index": "1.1.0",
"smtp-server": "3.13.4",
Expand Down

0 comments on commit cc832b2

Please sign in to comment.