Skip to content

Ditch StringEnum #680

@rcollette

Description

@rcollette

Describe the feature request?

Serializers have the the ability to convert Enums to strings. There is no need for StringEnum and in fact it gets in the way of doing what would normally be possible with regular Enums like:

        expected.Status = userStatus switch
        {
            UserStatus.STAGED => UserProfileStatus.STAGED,
            UserStatus.PROVISIONED => UserProfileStatus.PROVISIONED
        };

In the example here I'm unit testing with DTOs that have a different type than what the Okta SDK returns.

The above results in the compile error:
A constant value is expected

New or Affected Resource(s)

UserStatus at the least

Provide a documentation link

No response

Additional Information?

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions