The router is the second building block of the Random Generators feature. A router takes the output from a generator as input. The router then matches the key of that output to its content and returns what it matches. There are a total of three different types of routers. The router is really a Switch-Statement without a default value. In this article, you'll find all the information on routers and how they work. If you wish to learn how to create and use them check out the tutorial.
WORK IN PROGRESS
Router FieldsEach router has six fields that can be filled.
- Title (Mandatory): The title of the router. This field is important as it is used to create the key of the router. The key is used to reference this router in generators and templates.
- Description (Optional): A small description for your router. Use this to describe what is supposed to be routed.
- Type (Mandatory): You have to select one of the types. Check out the section below to get the details. This is the only field that cannot be changed after the router has been created!
- State (Mandatory): The router can be private or public.
- Tags (Optional): Use tags to organize your routers. You can use the search bar to filter the list based on these tags. Make sure that the routers which belong to the same Random Generator project have the same tag.
- JSON Payload: In this field you add the map which defines the routes the router uses. It always follows the same structure for each type and only differs in what the values contain.