c2-http 1.0.38 → 1.0.40

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.
@@ -144,7 +144,13 @@ function OpenApi(target) {
144
144
  };
145
145
  }
146
146
  });
147
- this.documentation = paths;
147
+ Controller.openApi = {
148
+ ...Controller.openApi,
149
+ paths: {
150
+ ...Controller.openApi.paths,
151
+ ...paths
152
+ }
153
+ };
148
154
  }
149
155
  getMethodsUsed2(obj) {
150
156
  const trueProperties = [];
@@ -1,36 +1,11 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
26
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
4
  };
28
5
  Object.defineProperty(exports, "__esModule", { value: true });
29
6
  exports.Server = void 0;
30
- const express_1 = __importStar(require("express"));
7
+ const express_1 = __importDefault(require("express"));
31
8
  const i18n_1 = require("../i18n");
32
- const swagger_ui_express_1 = __importDefault(require("swagger-ui-express"));
33
- const Controller_1 = require("./Controller");
34
9
  class Server {
35
10
  app;
36
11
  config;
@@ -41,7 +16,7 @@ class Server {
41
16
  async initialize(callback) {
42
17
  (0, i18n_1.initializei18n)(this.config.i18n);
43
18
  console.log(`Initializing server on ${this.config.port}...`);
44
- this.app.use((0, express_1.Router)().get("/docs", swagger_ui_express_1.default.serve, swagger_ui_express_1.default.setup(Controller_1.Controller.openApi)));
19
+ // this.app.use(Router().get("/docs", swaggerUI.serve, swaggerUI.setup(Controller.openApi)))
45
20
  this.config.globalMiddleware(this.app);
46
21
  for (const router of this.config.routes) {
47
22
  this.app.use(router);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "c2-http",
3
- "version": "1.0.38",
3
+ "version": "1.0.40",
4
4
  "description": "Biblioteca Typescript para API NodeJS",
5
5
  "repository": "https://cabralsilva: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@github.com/cabralsilva/c2-http.git",
6
6
  "author": "Daniel Cabral <cabralconsultoriaemsoftware@gmail.com>",