pingidentity / scim2

The UnboundID SCIM 2.0 SDK for Java
181 stars 74 forks source link

Serialize ErrorResponse status to string #90

Closed braveulysses closed 6 years ago

braveulysses commented 6 years ago

Previously, the ErrorResponse status value was serialized to a JSON number, but RFC 7644 actually calls for the field to be represented as a string. A custom serializer was added so that the status field is now serialized as a string; a custom deserializer was added that allows an ErrorResponse to be deserialized regardless of whether the status field is a string or a number. The SDK's ErrorResponse Java API is unchanged.

This addresses Issue #87.

JiraIssue: DS-18095

braveulysses commented 6 years ago

Clients written using this version of the SCIM 2 SDK should be backwards-compatible with servers written using earlier versions of the SDK. But older SDK clients and non-SDK clients that expect status to be a JSON number will not be compatible with servers written with this version of the SDK. @digitalperk, should we rev the SDK version to 2.2 or even 3.0?

digitalperk commented 6 years ago

It may be nice to add a serialization test as well. Otherwise, looks great!