Legende
Legende
CC#
Created by on 10/6/2023 in #help
❔ `required` keyword
The only place I have found this keyword usable is when defining response DTO. I usualy do not create constructors for them and use object inializing approach. Required keyword helps to remember that some fields should be always set, also when using nullable reference types it silence warnings "value is not set" since it always will be set and also improves OpenAPI spec
31 replies