Skip to content

Allow to specify named-values **in addition** to allowed-values for enum types #345

@Vampire

Description

@Vampire

Currently we only generate constant values for enums from their content.
If you have quite long or awkward possible values like the terms of use URL of the setup-gradle action, the names are a bit unhandy.

Additionally, if you have an enum with values that calculate to the same name like

inputs:
  some-enum:
    type: enum
    allowed-values:
      - foo-bar
      - foo_bar

which both evaluate to FooBar, you get a 500 internal server error as soon as you request the JAR, because a compile error will happen when trying to compile the bindings.

The latter could maybe also be solved by some logic to make the names unique,
but it could also be solved by this feature request which means, that you can give explicit names for enum values.

I think it makes sense to allow unnamed and named in the same element.

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