@athenna/http 4.11.0 → 4.12.0

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": "@athenna/http",
3
- "version": "4.11.0",
3
+ "version": "4.12.0",
4
4
  "description": "The Athenna Http server. Built on top of fastify.",
5
5
  "license": "MIT",
6
6
  "author": "João Lenon <lenon@athenna.io>",
@@ -39,7 +39,8 @@
39
39
  "src/**/*.js",
40
40
  "src/**/*.d.ts",
41
41
  "templates",
42
- "configurer"
42
+ "configurer",
43
+ "resources"
43
44
  ],
44
45
  "type": "module",
45
46
  "main": "./src/index.js",
@@ -64,7 +64,15 @@ export class HttpKernel {
64
64
  }
65
65
  if (swaggerUiPlugin) {
66
66
  debug('Not able to register swagger-ui plugin. Install @fastify/swagger-ui package.');
67
- await Server.plugin(swaggerUiPlugin, Config.get('http.swagger.ui'));
67
+ const swaggerUiConfig = Config.get('http.swagger.ui', {});
68
+ if (!swaggerUiConfig.logo) {
69
+ const image = new File(Path.resources('images/athenna-logo.png'));
70
+ swaggerUiConfig.logo = {
71
+ type: 'image/png',
72
+ content: image.getContentSync()
73
+ };
74
+ }
75
+ await Server.plugin(swaggerUiPlugin, swaggerUiConfig);
68
76
  }
69
77
  }
70
78
  /**