Last active
October 3, 2023 06:42
-
-
Save MichaelMarner/1696ba2b7b97b8c8cb85289b191de222 to your computer and use it in GitHub Desktop.
nullable example DTO
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class NestedTypeDto { | |
@ApiProperty({ | |
type: string | |
}) | |
value: string; | |
} | |
export class SampleDto { | |
@ApiProperty({ | |
type: NestedTypeDto, | |
required: true, | |
}) | |
propertyWorksCorrectly: NestedTypeDto; | |
@ApiProperty({ | |
type: NestedTypeDto, | |
required: true, | |
nullable: false, | |
}) | |
wrappedInAllOf: NestedTypeDto; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment