You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
We need to modify the API to parse enum values in incoming payloads, allowing them to be accepted in both lowercase and uppercase formats. This will ensure that the API is more flexible and tolerant to input variations, improving the user experience and reducing potential errors from case mismatches.
Motivation
Currently, our API only accepts enum values in a specific case format (either upper or lowercase, depending on the enum). By supporting both lowercase and uppercase inputs for enums, we can:
Improve compatibility.
Reduce the likelihood of payload rejection due to simple case mismatches.
Make the API more user-friendly, especially when integrating with third-party services that may not enforce strict casing rules.
Implementation details
Apply it for Job Launcher, Fortune Exchange Oracle, Fortune Recording Oracle, Reputation Oracle, HUMAN App backend.
Modify the enum parsing logic in the request handler to be case-insensitive.
Ensure that all enum values are normalized internally (converted to lowercase for consistent processing).
Add unit tests to verify that enum values in both uppercase and lowercase are accepted.
Ensure backward compatibility with existing functionality to avoid breaking any current integrations.
The text was updated successfully, but these errors were encountered:
Description
We need to modify the API to parse enum values in incoming payloads, allowing them to be accepted in both lowercase and uppercase formats. This will ensure that the API is more flexible and tolerant to input variations, improving the user experience and reducing potential errors from case mismatches.
Motivation
Currently, our API only accepts enum values in a specific case format (either upper or lowercase, depending on the enum). By supporting both lowercase and uppercase inputs for enums, we can:
Implementation details
The text was updated successfully, but these errors were encountered: