Skip to content

Commit

Permalink
Add note about evaluation order for enum path parameter serializer in…
Browse files Browse the repository at this point in the history
… README
  • Loading branch information
Sharparam committed Apr 28, 2019
1 parent f9ede57 commit 1bf86e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1184,7 +1184,7 @@ return "bar";

There is no default path serializer, as its usage is often very specific. If a path parameter has `PathSerializationMethod.Serialized` specified when no serializer has been set on the `RestClient`, an exception will be thrown.

There is a [`StringEnumRequestPathParamSerializer`](https://github.com/canton7/RestEase/blob/master/src/RestEase/StringEnumRequestPathParamSerializer.cs) provided with RestEase designed for serializing enums that have `EnumMember`, `DisplayName`, or `Display` attributes specified on their members. This can be used as-is or as a reference for your own implementation.
There is a [`StringEnumRequestPathParamSerializer`](https://github.com/canton7/RestEase/blob/master/src/RestEase/StringEnumRequestPathParamSerializer.cs) provided with RestEase designed for serializing enums that have `EnumMember`, `DisplayName`, or `Display` attributes specified on their members (evaluated in that order). This can be used as-is or as a reference for your own implementation.
To tell RestEase to use a path serializer, you must create a new `RestClient`, assign its `RequestPathParamSerializer` property, then call `For<T>()` to get an implementation of your interface.

Expand Down

0 comments on commit 1bf86e4

Please sign in to comment.