@stemy/backend 3.5.3 → 3.5.4
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/bundles/stemy-backend.umd.js +23 -13
- package/bundles/stemy-backend.umd.js.map +1 -1
- package/esm2015/utilities/decorators.js +23 -14
- package/fesm2015/stemy-backend.js +22 -13
- package/fesm2015/stemy-backend.js.map +1 -1
- package/package.json +1 -1
- package/stemy-backend.metadata.json +1 -1
- package/utilities/decorators.d.ts +3 -1
|
@@ -6056,32 +6056,42 @@
|
|
|
6056
6056
|
var PrimitiveArray = mongoose.Types.Array;
|
|
6057
6057
|
var DocumentArray = mongoose.Types.DocumentArray;
|
|
6058
6058
|
|
|
6059
|
-
function IsDocumented(summary) {
|
|
6059
|
+
function IsDocumented(summary, paramDescriptions) {
|
|
6060
6060
|
if (summary === void 0) { summary = null; }
|
|
6061
|
-
|
|
6062
|
-
|
|
6063
|
-
|
|
6064
|
-
|
|
6061
|
+
if (paramDescriptions === void 0) { paramDescriptions = {}; }
|
|
6062
|
+
return routingControllersOpenapi.OpenAPI(function (op) {
|
|
6063
|
+
var _a;
|
|
6064
|
+
op.summary = summary || op.summary;
|
|
6065
|
+
op.tags = ["Documented"].concat(op.tags || []);
|
|
6066
|
+
(_a = op.parameters) === null || _a === void 0 ? void 0 : _a.forEach(function (p) {
|
|
6067
|
+
if (p.$ref)
|
|
6068
|
+
return;
|
|
6069
|
+
var schema = p;
|
|
6070
|
+
schema.description = paramDescriptions[schema.name]
|
|
6071
|
+
|| schema.description
|
|
6072
|
+
|| ("param." + op.operationId + "." + schema.name).toLowerCase();
|
|
6073
|
+
});
|
|
6074
|
+
return op;
|
|
6065
6075
|
});
|
|
6066
6076
|
}
|
|
6067
6077
|
function JsonResponse(description, statusCode) {
|
|
6068
6078
|
if (description === void 0) { description = "Success"; }
|
|
6069
6079
|
if (statusCode === void 0) { statusCode = null; }
|
|
6070
|
-
return routingControllersOpenapi.OpenAPI(function (
|
|
6080
|
+
return routingControllersOpenapi.OpenAPI(function (op, route) {
|
|
6071
6081
|
var status = statusCode !== null && statusCode !== void 0 ? statusCode : routingControllersOpenapi.getStatusCode(route) + "";
|
|
6072
|
-
|
|
6073
|
-
|
|
6082
|
+
op.responses = op.responses || {};
|
|
6083
|
+
op.responses[status] = {
|
|
6074
6084
|
description: description,
|
|
6075
6085
|
content: {
|
|
6076
6086
|
"application/json": {}
|
|
6077
6087
|
}
|
|
6078
6088
|
};
|
|
6079
|
-
return
|
|
6089
|
+
return op;
|
|
6080
6090
|
});
|
|
6081
6091
|
}
|
|
6082
6092
|
function ResponseType(type, options) {
|
|
6083
6093
|
if (options === void 0) { options = {}; }
|
|
6084
|
-
return routingControllersOpenapi.OpenAPI(function (
|
|
6094
|
+
return routingControllersOpenapi.OpenAPI(function (op, route) {
|
|
6085
6095
|
var _b;
|
|
6086
6096
|
var _a;
|
|
6087
6097
|
var contentType = "application/json";
|
|
@@ -6092,8 +6102,8 @@
|
|
|
6092
6102
|
var schema = options.isArray
|
|
6093
6103
|
? { items: reference, type: "array" }
|
|
6094
6104
|
: reference;
|
|
6095
|
-
|
|
6096
|
-
|
|
6105
|
+
op.responses = op.responses || {};
|
|
6106
|
+
op.responses[statusCode] = {
|
|
6097
6107
|
description: options.description || "Success",
|
|
6098
6108
|
content: (_b = {},
|
|
6099
6109
|
_b[contentType] = {
|
|
@@ -6101,7 +6111,7 @@
|
|
|
6101
6111
|
},
|
|
6102
6112
|
_b)
|
|
6103
6113
|
};
|
|
6104
|
-
return
|
|
6114
|
+
return op;
|
|
6105
6115
|
});
|
|
6106
6116
|
}
|
|
6107
6117
|
|