Git Product home page Git Product logo

Comments (9)

odrotbohm avatar odrotbohm commented on August 19, 2024

The exporter currently only exports query methods, not customly implemented ones. Jon and me have already discovered the "issue" and a fix will be part of the next release.

from spring-data-rest.

jhiemer avatar jhiemer commented on August 19, 2024

Oliver, thanks a lot to both of you. I am waiting for it! :-)

from spring-data-rest.

dnz986 avatar dnz986 commented on August 19, 2024

Any news on this enhancement?

from spring-data-rest.

jhiemer avatar jhiemer commented on August 19, 2024

@olivergierke and @jbrisbin, I opened this issue ten months ago. Any chance that it will be included in a further release?

from spring-data-rest.

jbrisbin avatar jbrisbin commented on August 19, 2024

There is significant work involved in "abstracting the abstractions" to allow for this, particularly in spring-data-commons. A community contribution would be very welcome in this area (and probably the absolute fastest path to implementation).

from spring-data-rest.

odrotbohm avatar odrotbohm commented on August 19, 2024

I am a bit hesitant on this one and vote to not have a quick shot for it. Here's the rationale:

Currently we expose two major aspects of the repositories. The first one is CRUD methods. This can be done as they map onto HTTP verbs nicely. The second ones are declarative query methods as we can derive a resource identifier as well as the appropriate HTTP method to be used (GET). While we can definitely build up an identifier for the manually implemented method but we cannot derive the appropriate HTTP method by default.

What I can imagine is some sort of annotation that allows to define which method to use (@RequestMapping might be a candidate as well as @RestResource although the latter already seems to suffer from semantic overload depending on where it is used) and the exporter expecting the method to be present.

SD Commons already exposes RepositoryInformation instances through the Repositories helper class. The former already has an isCustomMethod(…) method to detect whether the method to handle is a custom one. Depending on how much time we find in the 1.1.0 timeframe, this might be a candidate for inclusion into this release. But as I said, right now you can simply declare a controller, wire the repo into it and manually map and execute the call, so it's not really a hit the wall scenario.

from spring-data-rest.

jhiemer avatar jhiemer commented on August 19, 2024

Hi,
I would be fine with @olivergierke's suggestion regarding the manual creation of a controllers and afterwards linking the repository methods into it. What would be really helpful to complete the API "style" is that these manually created controllers would be referenced in host:8080/api. Essentially that what I pointed out here: #92

from spring-data-rest.

jbrisbin avatar jbrisbin commented on August 19, 2024

Having you tried creating a ResourceProcessor<Resource<Link>> to modify the list of repositories?

from spring-data-rest.

jhiemer avatar jhiemer commented on August 19, 2024

Nope, not yet. What would be the way to go here?

from spring-data-rest.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.