lanthaler / HydraConsole

HydraConsole is an implementation of a generic API client for Hydra-based Web APIs in the form of a single-page application.
http://www.markus-lanthaler.com/hydra/
MIT License
103 stars 17 forks source link

@graph keys are full paths #26

Closed spficklin closed 7 years ago

spficklin commented 7 years ago

I'm trying to use the HydraConsole to validate web services I'm working on. After working through several issues trying to get the console to work I managed to get the details to show up! But next to the headline "Documentation" there is a drop down of Class names. I get an empty drop down. Digging in the code I find that the proxy.php is returning all of the keys in the @graph with their full URLs. So on line 433 of the hydra.js code it uses the definition.label to get add the label. But I have no label in the definition object because the element in the definition array is the full URL. This doesn't happen with the online demo. The elements retain their original names. I have looked over the demo code comparing it to my own and I cannot find what I'm doing wrong to cause the keys in the @graph to become full URLs. I tried to look at the proxy.php code but then I saw it uses the JsonLD PHP library which is a bit too much for me to look through. Any ideas on what I might be doing wrong?

spficklin commented 7 years ago

Well apparently the key to solving a problem is posting an issue. I just figured out the problem. I was using a different URL for the the hydra and rdfs vocabularies. When I fixed them the problem resolved itself. Here's what I had to use:

rdfs: http://www.w3.org/2000/01/rdf-schema# hydra: http://www.w3.org/ns/hydra/core#

lanthaler commented 7 years ago

Glad you figured it out yourself because this got lost in my inbox. Would be interested to learn more about what exactly you are working on. Feel free to post to public-hydra@w3.org if a wider audience is OK.

spficklin commented 7 years ago

Hi @lanthaler I'm currently traveling but when I get back I'd be happy to introduce our project via the mailing list.

lanthaler commented 7 years ago

You can do it at any time on public-hydra@w3.org. We also have bi-weekly conference calls. The next one is scheduled for Aug 21st. Feel free to join. All details can be found at https://www.w3.org/community/hydra/wiki/Conference_Calls

spficklin commented 7 years ago

Thanks for the reminder! I just sent an email to the list. I would be interested in attending the conference call, although Aug 21st at 11am US Pacific Daylight Time falls during the solar eclipse 🌞! So, I may have to skip that meeting in favor of a later date :-)