Releases: Payadel/OnRails
Releases · Payadel/OnRails
v3.2.0
v3.1.0
v3.0.0
3.0.0 (2024-12-12)
⚠ BREAKING CHANGES
- ConfigurationExtensions: change output of
GetConfig
to nullable - BadRequestError: use
Dictionary<string, List<string>> Errors
as custom field - refactor CollectionErrorDetail.cs to ErrorDetailList.cs
- Detail: change default message of CreatedDetail.cs and AcceptedDetail.cs
- Detail: update WarningDetail.cs
- use
Microsoft.AspNetCore.App
instead of deprecated packages - ResultDetail: change setter fields to
protected init
- WarningDetail:
- AcceptedDetail: big changes. add some props, update constructor, etc
- CreatedDetail: big changes. add some props, update constructor, etc
- ResultDetail: make setter for properties
public
- ResultDetail: big changes
- ActionResultView: In the previous version, 200 code was default for success result even we have not any value. But in this version we use 204 for null value.
- ActionResult: rename
ActionResultObject
toActionResultView
- ResultDetail: use
Dictionary
instead ofobject
inGetViewModel
- ErrorDetail:
Exception
field is removed - ResultDetail: change output of
AddDetail
method tovoid
- Try: update error detail
- ObjectExtensions: the
IsNullOrEmpty
removed - MustExtensions: the
MustNotNullOrEmpty
removed - ExceptionError: In constructor, default value for
message
removed and we setexception.message
if it be null. - ResultDetail: improve
ToString()
- update dotnet sdk version to 8.0
- ValidationError: In this version the
ValidationError
issealed
. So you can not inheritance from it. Create your custom class fromErrorDetail
. - ErrorDetail:
ExceptionData
class has removed and replaced withException
class - Result: In the previous version, the value was added only when it was not null, but in this version, if the result is successful, it will be added anyway.
- ResultBase: Result objects are more immutable.
- ErrorDetail: Use
ValidationError
instead ofArgumentError
- ResultDetail: Instead of checking if
MoreDetails
is null, check the number of elements in the list. - Increase minimum dotnet version to 6
- rename
IsSuccess
toSuccess
. fix #23 - rename
OnRail
toOnRails
- add
ToString()
toResult
andResultDetails
Features
- AcceptedAtActionDetail: add more constructor (475c7c1)
- AcceptedDetail: break it to multi classes (b6d56d6)
- ActionResult: add extensions (fe8c152)
- ActionResult: use asp action results for
CreatedDetail
andAcceptedDetail
(aa0bf2c) - add
NoContentDetail
(fed6fc0) - add
ResetContentDetail
(4ea15d3) - add
ToString()
toResult
andResultDetails
(8bf83db) - add
ToString()
toResult
andResultDetails
(ce6850e) - add RemoveDetail (42dd061)
- add RequestTrackingMiddleware.cs (21c57a9)
- ConflictError: add objectIdentity filed (c04a5e8)
- CreatedAtActionDetail: add more constructor (ba2ca91)
- CreatedDetail: break it to multi classes (97be240)
- Detail: update WarningDetail.cs (6397fdc)
- ErrorDetail: add
HasErrorTypeOf
method (a63eaf2) - ErrorDetail: add key-value error list to
ErrorDetail
(3ea85a6) - GetValuesExtensions: add
GetValuesExtensions
class (aae4e79) - InternalError: add status code to constructor parameters (38f2a38)
- make some fields more accessible for inherent classes (134b6e5)
- NotFoundError: use
List<KeyValue<object?>>
for save object keys (ac1f3ba) - OnFailExtensions: add
OnFailOperateWhen
extensions withType
condition (e35c437) - OnFailExtensions: add conditions base ErrorDetail or Exception type (bef8d69)
- OnFailThrowException: support async (d2ff11c)
- OnSuccess: add
OnSuccessAddMoreDetails
(b9bfa04) - OnSuccess: add overloads (f182965)
- OnSuccessExtensions: add more extensions (fb24057)
- OnSuccessExtensions: add more extensions (92884e5)
- OperateWhenExtensions: add
OperateWhen
extensions withType
condition (0e9381f) - PartialContentDetail: add
RangeData
class as custom data (04af280) - Result: add
GetViewValue
andGetViewStatusCode
methods (f33684e) - ResultBase: add
IsDetailTypeOf
method (e45a084) - ResultDetail: add
IsTypeOf
method (33181f3) - ResultDetail: add
View
prop to determine the detail is suitable for view/user or not (993ad8f) - ResultDetail: add CollectionErrorDetail.cs (5f5c253)
- TeeUsing: add more methods (fa5a8e9)
- TeeUsing: add overloads (604da26)
- Try: add TryOnExceptions for func params that return
Result
(without value) (f8e3481), closes #22 - Using: add more methods for async types (19a6dc5)
- Using: add overloads (2487fe4)
- utility: add ResultDetailExtensions.cs (2454e5d)
- ValidationError: add
List<KeyValuePair<string, string>> errors
to constructor (7ccf110) - WarningDetail: add new custom
ResultDetail
(101c25b)
Bug Fixes
- AcceptedDetail: big changes. add some props, update constructor, etc (dc223b9)
- ActionResult: improve
ReturnAcceptedAtAction
methods (2671c95) - ActionResult: improve
ReturnCreatedAtLocation
methods (784bc24) - ActionResultObject: fix using of
GetStatusCodeOrDefault
(0312bf5) - ActionResult: rename
ActionResultObject
toActionResultView
(a6892de) - ActionResultView: returns 204 code for null value (bc08f7e)
- add
[DebuggerStepThrough]
to KeyValue.cs (ba4b050) - add
Obsolete
attribute for non useful methods (e4d71a2) - BadRequestError: use `Dictionary<string, List...