-
Notifications
You must be signed in to change notification settings - Fork 71
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
Convert Hypercube and Houdini to respect Apix-Ldp-Resource header #611
Comments
Soooo this might be a good place for a couple questions and to reveal my lack of grasp of API-X. To start, would Houdini and Hypercube be Resource scope services? |
@dannylamb So after reading the "Generic Endpoint Proxy" example you linked to I have a couple questions.
|
It appears that instead we should be specify presets, so a request to
which replies (I was going to do JSON-LD, but that is sooo painful to write by hand)
Is that at all close to how this should work? |
I think maybe instead of thinking of it as two services, i'd treat each as its own service. E.g. http://localhost:8080/fcrepo/rest/some-image/svc:identify and http://localhost:8080/fcrepo/rest/some-image/svc:convert. Does that simplify things? |
Sure, so the other part is do we define a set of service options or do we advertise the header somehow? Like do we say that The latter seems more flexible but also harder to express in the "service menu" thingy. |
Testing InstructionsTo deploy the changes:
Then ingest a tiff into Fedora, I put mine at http://localhost:8080/fcrepo/rest/test.tiff.
|
@Islandora-CLAW/committers ^^ |
Nice work @dannylamb, I'll spin these up tonight. 👍 |
Worked as described |
Resolved with Islandora/Crayfish@ad6d957 and Islandora/Crayfish-Commons@f653297 |
Relevant reading: https://github.com/fcrepo4-labs/fcrepo-api-x/blob/master/src/site/markdown/execution-and-routing.md#endpoint-example
When Api-X will foward a request to a microservice, it will enrich the message with an Apix-Ldp-Resource header. Instead of reading in the path from the url and combining that with the Fedora base url, we should simply use this header provided by Api-X in Hypercube and Houdini. This means the endpoints will not have any route parameters, and we'll need to use a
before
middleware to manually execute the FedoraResourceConverter and jam it into the request.It's a bit tough to set things on the Request, so it may be easier to duplicate it and provide the response from Chullo in the
attribute
parameter.Controllers will also need to be touched up to retrieve the response from Chullo, as it will no longer be provided as a route parameter.
The text was updated successfully, but these errors were encountered: