相关疑难解决方法(0)

HAL - is it a violation to the HAL format/standard if links are in the main body?

According to the HAL standard (see here and here) the links to other resources should be placed in a specific embedded section.

So for instance this is not valid HAL, is my understanding correct?

{
  "movies": [
     {
       "id": "123",
       "title": "Movie title 1",
       "_links": {
           "subtitles": {
              "href": "/movies/123/subtitles"
           }
        }
     },{
       "id": "456",
       "title": "Movie title 2",
       "_links": {
           "subtitles": {
              "href": "/movies/456/subtitles"
           }
        }
     }
  ],
  "_links": {
      "self": {
         "href": "/movies"
      }
   }
}
Run Code Online (Sandbox Code Playgroud)

The …

rest json hateoas discoverability hypermedia

1
推荐指数
1
解决办法
1772
查看次数

标签 统计

discoverability ×1

hateoas ×1

hypermedia ×1

json ×1

rest ×1