c2-http 1.0.39 → 1.0.41

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.
@@ -4,7 +4,6 @@ export declare abstract class Controller {
4
4
  routers: Router;
5
5
  documentation: any;
6
6
  protected options: IControllerOptions;
7
- static openApi: any;
8
7
  constructor(_options: Partial<IControllerOptions>);
9
8
  }
10
9
  export declare function HttpDispatchHandling(target: any, methodName: string, descriptor: PropertyDescriptor): PropertyDescriptor;
@@ -10,7 +10,7 @@ class Controller {
10
10
  documentation;
11
11
  options;
12
12
  // Propriedade estática compartilhada por todas as instâncias
13
- static openApi = {};
13
+ // static openApi: any = {};
14
14
  constructor(_options) {
15
15
  this.options = _options;
16
16
  if (!this?.options?.relativePath?.startsWith("/")) {
@@ -30,7 +30,7 @@ class Controller {
30
30
  this.options.prefixRole = defaultPrefixRole.replaceAll("/", "-");
31
31
  }
32
32
  this.options.uri = `${this.options.basePath}${this.options.relativePath}`;
33
- Controller.openApi = {
33
+ global.OPEN_API_DOC = {
34
34
  "openapi": "3.1.0",
35
35
  "info": {
36
36
  "version": "1.0.0",
@@ -144,7 +144,13 @@ function OpenApi(target) {
144
144
  };
145
145
  }
146
146
  });
147
- this.documentation = paths;
147
+ global.OPEN_API_DOC = {
148
+ ...global.OPEN_API_DOC,
149
+ paths: {
150
+ ...global.OPEN_API_DOC.paths,
151
+ ...paths
152
+ }
153
+ };
148
154
  }
149
155
  getMethodsUsed2(obj) {
150
156
  const trueProperties = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "c2-http",
3
- "version": "1.0.39",
3
+ "version": "1.0.41",
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>",