collection-json

HATEOAS and forms driven by the API

半城伤御伤魂 提交于 2019-12-23 12:26:54
问题 I'm trying to apply HATEOAS to the existing application and I'm having trouble with modeling a form inputs that would be driven by the API response. The app is allowing to search & book connections between two places. First endpoint allows for searching the connections GET /connections?from={lat,lon}&to={lat,lon}&departure={dateTime} and returns following payload (response body). [ { "id": "aaa", "carrier": "Fast Bus", "price": 3.20, "departure": "2019-04-05T12:30" }, { "id": "bbb", "carrier"