hateoas - Non-contextual operations using REST and HATEOS -


i trying implement hateos based rest service hotel booking have confusion:

1) how apart wadl, client comes know possible operations , corresponding uri. should put possible operations , uri response when client hits root of rest service?

2) when client gets list of accommodation options in area, returning list of hotels in area asked about. response contains:

<accommodation>   <hotel info="http://welco.me/hotel/xxxxxx" price="5000"/>   <hotel info="http://welco.me/hotel/yyyyyyy" price="3000"/> </accommodation> 

but query have here how client going know other related possible operations getting list in sorted order of price?

  1. in answer first question, there couple of specs documents allow clients discover restful apis.
  2. for second questions again, tend towards clients/developers discovering parameters such sorting swagger/json home document. if super strong/important relationship return in responses linked data:
    • in hal can provide links object links related resources.
    • in json-ld can add field value of related api url. may add @content add information describes relationship means.

Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -