Skip to content

Should have a variant sample that has non-string variant values. #30

Open

Description

The only variant sample I see is at https://github.com/microsoft/FeatureManagement/blob/main/Samples/VariantAssignment.sample.json. Unfortunately, this sample only has strings for configuration_value. Ideally, I'd like to see some sample that shows that configuration_value is multi-typed.

Activity

  1. zhiyuanliang-ms commented on Mar 3, 2025

    @zhiyuanliang-ms
    Member

    Hi, Jimmy Campbell (@jimmypc92). Thanks for reaching out!

    Which programming language are you using? In strong-typed language like C#, "multi-typed" value doesn't make a lot of sense to me. The configuration_value can be an object.

    Could you give us more details about your scenario and motivation why you want to use a single variant for "multi-typed" configuration value? Could you give us a code snippet showing how you will consume the variant configuration value? We are very glad to learn more about how our customers will use variant feature flags.

  2. jimmypc92 commented on Mar 3, 2025

    @jimmypc92
    Author

    I mean the configuration_value can be more than a string. See:

    "type": ["string", "null", "number", "object", "array", "boolean"],
    . But from the examples it looks as if it only supports string

  3. zhiyuanliang-ms commented on Mar 4, 2025

    @zhiyuanliang-ms
    Member

    Jimmy Campbell (@jimmypc92) That's a good call. BTW, which programming language would you like the example to be written in? In the long run, we will create examples for all language we support (C#, JS, java, python). But it might take some time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions