-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Enums like Job.Status
| public JobStatusEnum? Status { get; init; } |
Yash Gogri at Merge helped me understand this in a prior email conversation:

In the situations where there may be custom values set up by the end-user, Merge will not have those enums mapped (since they aren't standard). In those situations, we will return the raw value from the API. While our Platform team aims to map as much values into the enums as possible, it's always possible a new customer can have a custom set-up where their status values don't fall into what's been already mapped.
Screenshot 2023-12-11 at 11.11.33 AM.png
Due to this, we do recommend keeping additional checks / leniency around enum values. Many of our customers implement fuzzy matching on top of our enums whenever a raw value gets returned. Some customers actually during their onboarding process directly ask their customers what Status Values they use in their system and how they'd like that reflected in the product. From there, they'll use our show_enum_origins parameter to always return the raw value and map those accordingly based on the customer's ask.
Is it possible to implement such leniency in this client, perhaps Job.Status should be a OneOf string / JobStatus enum?
Metadata
Metadata
Assignees
Labels
No labels