nicot 1.1.35 → 1.1.37
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/index.cjs +8 -6
- package/dist/index.cjs.map +2 -2
- package/dist/index.mjs +8 -6
- package/dist/index.mjs.map +2 -2
- package/dist/src/restful.d.ts +4 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -321,6 +321,11 @@ var ParseBoolObjectPipe = class {
|
|
|
321
321
|
};
|
|
322
322
|
|
|
323
323
|
// src/decorators/property.ts
|
|
324
|
+
var NotRequiredButHasDefaultDec = () => Metadata.set(
|
|
325
|
+
"notRequiredButHasDefault",
|
|
326
|
+
true,
|
|
327
|
+
"notRequiredButHasDefaultFields"
|
|
328
|
+
);
|
|
324
329
|
function swaggerDecorator(options, injected = {}) {
|
|
325
330
|
const notRequiredButHasDefault = options.required == null && options.default != null;
|
|
326
331
|
const apiPropertyDec = (0, import_swagger2.ApiProperty)({
|
|
@@ -334,11 +339,7 @@ function swaggerDecorator(options, injected = {}) {
|
|
|
334
339
|
if (notRequiredButHasDefault) {
|
|
335
340
|
return (0, import_nesties3.MergePropertyDecorators)([
|
|
336
341
|
apiPropertyDec,
|
|
337
|
-
|
|
338
|
-
"notRequiredButHasDefault",
|
|
339
|
-
true,
|
|
340
|
-
"notRequiredButHasDefaultFields"
|
|
341
|
-
)
|
|
342
|
+
NotRequiredButHasDefaultDec()
|
|
342
343
|
]);
|
|
343
344
|
} else {
|
|
344
345
|
return apiPropertyDec;
|
|
@@ -394,7 +395,8 @@ var UuidColumn = (options = {}) => {
|
|
|
394
395
|
type: String,
|
|
395
396
|
format: "uuid",
|
|
396
397
|
example: "550e8400-e29b-41d4-a716-446655440000"
|
|
397
|
-
})
|
|
398
|
+
}),
|
|
399
|
+
...options.generated ? [NotRequiredButHasDefaultDec()] : []
|
|
398
400
|
]);
|
|
399
401
|
};
|
|
400
402
|
var intMaxList = {
|