c2-http 1.0.71 → 1.0.72

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.
@@ -87,9 +87,22 @@ function OpenApi(target) {
87
87
  OAuth2: route.middlewareCheckAuthorization.roles
88
88
  }
89
89
  ];
90
+ methods[route.method].responses =
91
+ {
92
+ "200": {
93
+ "content": {
94
+ "application/json": {
95
+ "schema": {
96
+ "type": "object"
97
+ }
98
+ }
99
+ }
100
+ }
101
+ };
90
102
  }
91
- paths[route.uri] = {
92
- ...paths[route.uri],
103
+ const pathsAux = route.uri.replace(/:([^/]+)/g, "{$1}");
104
+ paths[pathsAux] = {
105
+ ...paths[pathsAux],
93
106
  ...methods
94
107
  };
95
108
  });
@@ -22,7 +22,7 @@ class Server {
22
22
  this.app.use(router);
23
23
  }
24
24
  for (const router of this.config.routesWithToken) {
25
- router.use(this.config.tokenCheckMiddleware);
25
+ // router.use(this.config.tokenCheckMiddleware)
26
26
  this.app.use(router);
27
27
  }
28
28
  console.log(global.OPEN_API_DOC);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "c2-http",
3
- "version": "1.0.71",
3
+ "version": "1.0.72",
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>",