Kordishal / generator-issues

A repository to collect and discuss feature requests for the World Anvil Generators.
https://www.worldanvil.com/studio/generators
2 stars 0 forks source link

Default value for Router #9

Open mDehning opened 3 years ago

mDehning commented 3 years ago

Relevant for all types of Routers.

When setting up a router, (the glorified if / switch-case statement) it would be helpful to define a default option, if none of the inputs match.

Additionally, a case for an empty input would be helpful as well

Use case: Expanding one generator with new values while the router does not need a new special case for this new value.

suggested format:

{
    "transformer": {
        "vegetable": "healthy",
        "apple": "healthy",
        "sweets": "unhealthy",
        "pizza": "unhealthy",
        "lasagne": "I don't care,give!"
    },
    "unmapped": "probably unhealthy",
    "empty": "nothingness is not healthy at all"
}
iamromeo commented 3 years ago

will be actioning this