@zuplo/cli 1.37.0 → 1.38.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/dist/convert/engine.js +13 -0
- package/package.json +1 -1
package/dist/convert/engine.js
CHANGED
|
@@ -15,9 +15,22 @@ export function convertRoutes(routesConfig) {
|
|
|
15
15
|
pathObject = paths[pathObjectKey];
|
|
16
16
|
const operationKey = route.methods.map((m) => m.toLowerCase()).join(",");
|
|
17
17
|
const operation = {};
|
|
18
|
+
if (route.excludeFromOpenApi) {
|
|
19
|
+
operation["x-internal"] = true;
|
|
20
|
+
}
|
|
18
21
|
operation["summary"] = route.summary;
|
|
19
22
|
operation["description"] = route.description;
|
|
20
23
|
operation["operationId"] = route.operationId;
|
|
24
|
+
const routeWithOpenApi = route;
|
|
25
|
+
if (routeWithOpenApi.parameters) {
|
|
26
|
+
operation["parameters"] = routeWithOpenApi.parameters;
|
|
27
|
+
}
|
|
28
|
+
if (routeWithOpenApi.responses) {
|
|
29
|
+
operation["responses"] = routeWithOpenApi.responses;
|
|
30
|
+
}
|
|
31
|
+
if (routeWithOpenApi.tags) {
|
|
32
|
+
operation["tags"] = routeWithOpenApi.tags;
|
|
33
|
+
}
|
|
21
34
|
const xZuploRoute = {};
|
|
22
35
|
if (route.corsPolicy)
|
|
23
36
|
xZuploRoute["corsPolicy"] = route.corsPolicy;
|