I'm trying to configure a Siren for my home page but I'm having some trouble with the path. I have a /home that looks like this:
{
"class": ["home"],
"properties": {},
"entities": [
{
"class": ["game-list"],
"rel": ["collection"],
"href": "/game",
"title": "List of available games",
"properties": {
"games": [
{
"name": "Chess",
"href": "/game/chess"
},
{
"name": "Checkers",
"href": "/game/chekers"
},
{
"name": "Battleship",
"href": "/game/battleship"
}
]
},
}
],
"actions": [
{
"name": "start-game",
"title": "Start a new game",
"method": "POST",
"href": "/game",
"type": "application/json",
"fields": [
{ "name": "gameName", "type": "text" }
]
}
],
"links": [
{
"rel": ["self"],
"href": "/"
},
{
"rel": ["login"],
"href": "/login"
},
{
"rel": ["register"],
"href": "/register"
},
{
"rel": ["info"],
"href": "/info"
}
]
}
How can I change the action so it sends the request to /game/{game} using the gameName in the field to substitute the {game}? Or is there another alternative that I'm not finding?