Skip to content

Latest commit

 

History

History
257 lines (147 loc) · 7.25 KB

CHANGELOG.md

File metadata and controls

257 lines (147 loc) · 7.25 KB

Change Log

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

[1.18.2] - 2023-08-30

Fixed

  • prevent double type field in api properties #29

[1.18.0] - 2023-08-10

Added

  • add @DtoCreateHidden and @DtoUpdateHidden annotation #21
  • add @DtoApiHidden annotation to add @ApiHideProperty decorator #23
  • add DtoRelationCanDisconnectOnUpdate annotation #25 (thanks to @m1212e)

Changed

  • Use default ApiProperty required behavior #18. Use requiredResponseApiProperty = "false" parameter for the old behavior.
  • create a combined index.ts in root output folder #22
  • upgrade to [email protected] now parses triple-slash comments on composite types

Fixed

  • add type to @ApiProperty if field is a list #20

[1.17.4] - 2023-03-04

Fixed

  • fix connect and create class names that get too many suffixes if dtoSuffix does not end with dto #17

[1.17.3] - 2023-02-22

Fixed

  • fix namespaced imports with @DtoCastType annotation #16

[1.17.2] - 2023-02-10

Fixed

  • prisma imports for ConnectDTOs

[1.17.0] - 2023-02-10

Added

  • support custom prisma-client import path #15 (thanks to konsti)
  • definiteAssignmentAssertion flag to optionally add definite assignment assertion operator ! to properties #14
  • support for compound unique inputs #i8, all ConnectDTOs now have proper swagger and class-validation decorators

Fixed

  • regular expression for class validators was also matching substrings

[1.16.0] - 2023-01-06

Added

[1.15.0] - 2022-12-04

  • updated dependencies #11

Fixed

  • replaceAll is not supported by Node.js < 15 #10

[1.14.0] - 2022-11-22

Added

  • add ApiProperty type and class validation to relation inputs #6

Fixed

  • add isArray: true in ApiProperty decorator, if field is list
  • build dist files with LF endings #9

[1.13.0] - 2022-09-14

Added

  • support for composite types (including nested class validation) #2
  • @DtoTypeFullUpdate annotation #2
  • optionally auto-format output with prettier #3 (thanks to @Zyrakia)

Changed

  • set @ApiProperty({ required: false, nullable: true } if field is optional
  • add { each: true } class-validator option if field is a list
  • class-validator @IsDateString() for type DateTime and @IsDecimal for type Decimal

[1.13.0-beta.1] - 2022-09-10

Added

  • @DtoTypeFullUpdate annotation #2

[1.12.2] - 2022-09-09

Fixed

  • optional fields can be null only UpdateDTO

[1.12.1] - 2022-09-09

Fixed

  • optional fields can be null in CreateDTO and UpdateDTO

[1.13.0-beta.0] - 2022-09-02

Added

  • support for composite types (including nested class validation) #2

Changed

  • set @ApiProperty({ required: false, nullable: true } if field is optional
  • add { each: true } class-validator option if field is a list

[1.12.0] - 2022-07-25

Added

  • @DtoRelationIncludeId annotation: relation IDs are omitted by default, but can be forced to be included in the DTOs

[1.11.4] - 2022-05-17

Fixed

  • removed class validator @IsJSON() from CreateDTO and UpdateDTO for fields with Json type, because request body is already parsed and the respective property is not a JSON string anymore

[1.11.3] - 2022-05-02

Fixed

  • if entity prefix/suffix is specified, relation input DTOs are named incorrectly (occurs if tags like @DtoRelationCanConnectOnCreate are used)

[1.11.2] - 2022-04-20

Fixed

  • escape aposthrophe ' with \', otherwise string generation breaks

[1.11.1] - 2022-04-14

Fixed

  • field with attribute @default("") resulted in empty default value: @Apiproperty({ default: })'
  • parsed apiProperties were propagated to other DTOs

[1.11.0] - 2022-03-31

Added

  • optionally add validation decorators from class-validator

[1.10.0] - 2022-03-29

Added

  • config outputType to generate DTOs as class or as interface

[1.9.1] - 2022-03-29

Fixed

  • missing import of ApiProperty

[1.9.0] - 2022-03-29

Added

  • flag flatResourceStructure to flatten the subfolders if outputToNestJsResourceStructure is true
  • flag noDependencies to output DTOs without any imports and decorators from external dependencies (useful to generate DTOs for frontend)
  • @example annotation adds example to @ApiProperty()

[1.8.1] - 2022-03-25

Fixed

  • missing import of ApiProperty if only type-format annotations

[1.8.0] - 2022-03-25

Added

  • generate plain DTO classes (same as entity classes, but without relation fields)

Changed

  • default values are added to the @ApiDecorator() only in the CreateDTO and UpdateDTO classes

[1.7.1] - 2022-03-22

Fixed

  • omit @ApiProperty() annotations for connect-dto classes

[1.7.0] - 2022-03-18

Added

  • add default value (if any) to @ApiProperty()

[1.6.2] - 2022-03-16

Added

  • process additional documentation tags to generate @ApiProperty() decorator
  • translate prisma type to schema object type and format

[1.4.1] - 2021-10-08

  • upgrades prisma dependencies to their latest 3.x versions

Fixed

  • Generated code imports using \ instead of / (#10)

[1.4.0] - 2021-09-24

  • upgrades prisma dependencies to their latest 3.x versions

[1.3.1] - 2021-09-24

  • applies available minor and patch updates to dependencies