@trojs/openapi-server 1.0.7 → 1.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@trojs/openapi-server",
3
3
  "description": "OpenAPI Server",
4
- "version": "1.0.7",
4
+ "version": "1.0.9",
5
5
  "author": {
6
6
  "name": "Pieter Wigboldus",
7
7
  "url": "https://trojs.org/"
package/src/api.js CHANGED
@@ -4,6 +4,7 @@ import { setupRouter } from './router.js'
4
4
 
5
5
  /**
6
6
  * @typedef {import('openapi-backend').Handler} Handler
7
+ * @typedef {import('ajv').Options} AjvOpts
7
8
  * @typedef {object} Logger
8
9
  * @property {Function} error
9
10
  * @property {Function} warn
@@ -25,7 +26,7 @@ import { setupRouter } from './router.js'
25
26
  * @property {SecurityHandler[]=} securityHandlers
26
27
  * @property {boolean=} swagger
27
28
  * @property {boolean=} apiDocs
28
- * @property {object=} ajvOptions
29
+ * @property {AjvOpts=} ajvOptions
29
30
  */
30
31
 
31
32
  /**
package/src/router.js CHANGED
@@ -10,6 +10,7 @@ import { unauthorized } from './handlers/unauthorized.js'
10
10
  /**
11
11
  * @typedef {import('./api.js').Logger} Logger
12
12
  * @typedef {import('./api.js').SecurityHandler} SecurityHandler
13
+ * @typedef {import('ajv').Options} AjvOpts
13
14
  * Setup the router
14
15
  * @param {object} params
15
16
  * @param {string=} params.secret
@@ -21,7 +22,7 @@ import { unauthorized } from './handlers/unauthorized.js'
21
22
  * @param {Logger=} params.logger
22
23
  * @param {object=} params.meta
23
24
  * @param {SecurityHandler[]=} params.securityHandlers
24
- * @param {object=} params.ajvOptions
25
+ * @param {AjvOpts=} params.ajvOptions
25
26
  * @returns {{ api, openAPISpecification: object }}
26
27
  */
27
28
  export const setupRouter = ({ secret, openAPISpecification, controllers, apiRoot, strictSpecification, errorDetails, logger, meta, securityHandlers = [], ajvOptions = {} }) => {