I'm trying to patch the Status field on something, where Status is an Enum. We're using EnumMember on our enum values to specify how the client should see them, e.g.
public Enum Status
{
[EnumMember(Value="open")]
Open = 1,
[EnumMember(Value="in_progress")]
InProgress = 1,
[EnumMember(Value="closed")]
Closed = 1,
}
When we try to patch this status to in_progress it can't map that back to the Status.InProgress.
[
{
op: "replace", path: "/status", value: "in_progress"
}
]
I'm happy to put a PR in for this, but thought I'd get your take on how you'd like to see this implemented first. Thought you might have some preferences about using JsonProperty Description EnumMember etc attributes, things like that.
I'm trying to patch the
Statusfield on something, whereStatusis anEnum. We're usingEnumMemberon our enum values to specify how the client should see them, e.g.When we try to patch this status to
in_progressit can't map that back to theStatus.InProgress.I'm happy to put a PR in for this, but thought I'd get your take on how you'd like to see this implemented first. Thought you might have some preferences about using
JsonPropertyDescriptionEnumMemberetc attributes, things like that.