@nest-omni/core 3.1.1-21 → 3.1.1

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.
@@ -17,7 +17,7 @@ class DtoTransformer {
17
17
  return __awaiter(this, void 0, void 0, function* () {
18
18
  const services = yield dto_service_accessor_1.DtoServiceAccessor.getServicesForDto(dtoClass);
19
19
  const options = {
20
- excludeExtraneousValues: false,
20
+ excludeExtraneousValues: true,
21
21
  exposeUnsetFields: true,
22
22
  enableImplicitConversion: true,
23
23
  enableCircularCheck: true,
@@ -34,7 +34,7 @@ class DtoTransformer {
34
34
  }
35
35
  const services = yield dto_service_accessor_1.DtoServiceAccessor.getServicesForDto(dtoClass);
36
36
  const options = {
37
- excludeExtraneousValues: false,
37
+ excludeExtraneousValues: true,
38
38
  exposeUnsetFields: true,
39
39
  enableImplicitConversion: true,
40
40
  enableCircularCheck: true,
@@ -383,6 +383,7 @@ function FQDNFieldOptional(options = {}) {
383
383
  return (0, common_1.applyDecorators)((0, validator_decorators_1.IsEmptyable)(), FQDNField(Object.assign({ required: false }, options)));
384
384
  }
385
385
  function DateField(options = {}) {
386
+ var _a;
386
387
  const decorators = [
387
388
  (0, class_transformer_1.Type)(() => Date),
388
389
  (0, class_validator_1.IsDate)({ message: (0, nestjs_i18n_1.i18nValidationMessage)('validation.IS_DATE') }),
@@ -406,7 +407,8 @@ function DateField(options = {}) {
406
407
  }));
407
408
  }
408
409
  if (options.swagger !== false) {
409
- decorators.push((0, swagger_1.ApiProperty)(Object.assign({ type: Date }, options)));
410
+ const swaggerOptions = Object.assign({ type: Date, example: (_a = options.example) !== null && _a !== void 0 ? _a : new Date() }, options);
411
+ decorators.push((0, swagger_1.ApiProperty)(swaggerOptions));
410
412
  }
411
413
  return (0, common_1.applyDecorators)(...decorators);
412
414
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nest-omni/core",
3
- "version": "3.1.1-21",
3
+ "version": "3.1.1",
4
4
  "description": "A comprehensive NestJS framework for building enterprise-grade applications with best practices",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",