zyket 1.0.26 → 1.0.27

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,6 +1,6 @@
1
1
  {
2
2
  "name": "zyket",
3
- "version": "1.0.26",
3
+ "version": "1.0.27",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -14,6 +14,16 @@ module.exports = class Express extends Service {
14
14
  #container;
15
15
  #app;
16
16
  #httpServer;
17
+ static swaggerConfig = {
18
+ info: {
19
+ title: process.env.API_DOCS_TITLE || "API Documentation",
20
+ version: version,
21
+ description: process.env.API_DOCS_DESCRIPTION || "API Documentation generated by Swagger",
22
+ },
23
+ servers: [
24
+ { url: `http://localhost:3000` }
25
+ ],
26
+ }
17
27
 
18
28
  constructor(container) {
19
29
  super("express");
@@ -38,16 +48,7 @@ module.exports = class Express extends Service {
38
48
 
39
49
  // Swagger setup
40
50
  const swaggerOptions = {
41
- swaggerDefinition: {
42
- info: {
43
- title: process.env.API_DOCS_TITLE || "API Documentation",
44
- version: version,
45
- description: process.env.API_DOCS_DESCRIPTION || "API Documentation generated by Swagger",
46
- },
47
- servers: [
48
- { url: `http://localhost:3000` }
49
- ],
50
- },
51
+ ...Express.swaggerConfig,
51
52
  apis: [path.join(process.cwd(), "src", "routes", "**", "*.js")],
52
53
  };
53
54
  const swaggerDocs = swaggerJsDoc(swaggerOptions);