Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TemplateVariables not recognized in "by-location" link #1

Open
aheusingfeld opened this issue Sep 23, 2014 · 1 comment
Open

TemplateVariables not recognized in "by-location" link #1

aheusingfeld opened this issue Sep 23, 2014 · 1 comment

Comments

@aheusingfeld
Copy link

The storesByLocationLink which is defined by the spring-data-rest interface StoreRepository doesn't have any template variables. The JSON of the "rest-microservice-store" looks like this:

$ curl http://localhost:8081/stores/search
{
  "_links" : {
    "by-location" : {
      "href" : "http://localhost:8081/stores/search/findByAddressLocationNear{?location,distance,page,size,sort}",
      "templated" : true
    }
  }
}

As this seems fine to me but the customer JSON looks like this ...

{
  "_embedded": {
    "customers": [
      {
...
        },
        "_links": {
          "self": {
            "href": "http://localhost:8080/customers/1"
          },
          "stores-nearby": {
            "href": "http://localhost:8081/stores/search/findByAddressLocationNear"
          }
        }
      }
    ]
  }
}

... I assume the variables get lost inside the Traverson.

@aheusingfeld
Copy link
Author

Actually the cause seems to be that .asLink() only receives the URI without the variables.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant