Uploaded image for project: 'Spring Data REST'
  1. Spring Data REST
  2. DATAREST-542

ResourceProcessor not invoked for empty collections

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.4 M1 (Gosling)
    • Component/s: None
    • Labels:
      None

      Description

      Hi there,

      at the moment opening the rest representation of a given entity I see this:

      {
        "_links" : {
          "self" : {
            "href" : "https://localhost:8112/storefront/rest/category{?page,size,sort}",
            "templated" : true
          },
          "next" : {
            "href" : "https://localhost:8112/storefront/rest/category?page=2&size=20{&sort}",
            "templated" : true
          },
          "search" : {
            "href" : "https://localhost:8112/storefront/rest/category/search"
          }
        },
        "_embedded" : {
      ....
      }
      

      What I would love to see is the ability to specify custom links in the `_links` section. So that the end result would be like this:

      {
        "_links" : {
          "self" : {
            "href" : "https://localhost:8112/storefront/rest/category{?page,size,sort}",
            "templated" : true
          },
          "next" : {
            "href" : "https://localhost:8112/storefront/rest/category?page=2&size=20{&sort}",
            "templated" : true
          },
          "search" : {
            "href" : "https://localhost:8112/storefront/rest/category/search"
          },
          "mynewlink": {
           "href" : "https://localhost:8112/storefront/rest/category/mynewlink"
          }
        },
        "_embedded" : {
      ...
      }
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              olivergierke Oliver Drotbohm
              Reporter:
              ptahchiev Petar Tahchiev
              Last updater:
              Oliver Drotbohm
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: