You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: MyApp/_pages/releases/v10_00.md
+7-3Lines changed: 7 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -497,7 +497,9 @@ For organizations with legacy applications, it means **modernization is now econ
497
497
498
498
## Add ServiceStack Reference
499
499
500
-
Other disruptive changes in this release include nullable reference type annotations are now enabled by default, where previously DTOs would only include nullable annotations for Nullable Value Type properties:
500
+
Other disruptive changes in this release include nullable reference type annotations are now enabled by default, where it's now assumed ServiceModel projects have `<Nullable>enable</Nullable>`.
501
+
502
+
Previously DTOs would only include nullable annotations for Nullable Value Type properties, now nullable reference types like `string? Notes`:
501
503
502
504
```csharp
503
505
publicpartialclassCreateBooking
@@ -522,9 +524,10 @@ public partial class CreateBooking
522
524
}
523
525
```
524
526
525
-
They're now being generated for optional (i.e. non-required) nullable Reference Types as well:
527
+
Will be reflected in the generated DTOs for languages that support nullable annotations. Required reference properties like `Name` are required and optional reference properties like `Notes` are correctly annotated as optional:
526
528
527
529
```csharp
530
+
// C# Geenrated DTOs
528
531
publicpartialclassCreateBooking
529
532
: IReturn<IdResponse>, ICreateDb<Booking>
530
533
{
@@ -545,9 +548,10 @@ public partial class CreateBooking
545
548
}
546
549
```
547
550
548
-
This is also reflected in generated TypeScript DTOs where required reference properties like `name`are no longer optional and optional reference properties like `notes` are now correctly annotated as optional:
551
+
The same type annotations are also applied to TypeScript DTOs:
0 commit comments