Repository navigation
1.0.0-preview.2
Pre-release
Pre-release
·
12 commits
to main
since this release
Second preview, with fixes from adopting 1.0.0-preview.1 in a real API.
Changes
SortableDto.ValidateAll(assemblies)skips abstract types, so a base class can mark properties[Sortable]for the DTOs that inherit them without failing startup.- New
SortableDto.ValidateAll(IEnumerable<Type>)checks just the DTOs you pass:SortableDto.ValidateAll([typeof(OrderDto), typeof(CustomerDto)]). Use it when some types have[Sortable]properties but are never sorted, such as a DTO that only inherits them. - Every
PagedData<T>andPagingMetadataproperty isrequired, so an OpenAPI document (Microsoft.AspNetCore.OpenApi 10 and 11, checked) lists them all as required, with no schema transformer of your own. Both types also read back from JSON now.- The existing constructors still work, and are the way to build a page: they work out
TotalPagesandHasNextPage. - The new parameterless constructors are for serializers and object initializers.
TotalPagesandHasNextPageare now set by the constructor, no longer computed when read.
- The existing constructors still work, and are the way to build a page: they work out
Packages
Full changelog: v1.0.0-preview.1...v1.0.0-preview.2