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

Collection property not exposed with other properties #142

Open
tpluscode opened this issue Aug 23, 2019 · 2 comments
Open

Collection property not exposed with other properties #142

tpluscode opened this issue Aug 23, 2019 · 2 comments

Comments

@tpluscode
Copy link
Member

Hydra vocabulary clearly states that hydra:collection is a hydra:Link. Whatever tool performs the assertion regarding hydra vocabulary must understand it's semantics.

Originally posted by @alien-mcl in HydraCG/api-examples#8

@tpluscode
Copy link
Member Author

The problem is that a resource's getProperties() method looks for supported properties of declared type and not other predicates.

Unless hydra:collection is used as a supported property of a class, it will not be returned by getLinks()

@thewilkybarkid
Copy link

After a bit of debugging, this seems to be related to libero/article-store#49 (comment) (where hydra:collection is a supported property). The supported hydra:collection is returned from getLinks(), and the actual hydra:collection implementation is returned from getCollections(). The GHA joins them together in https://github.com/hypermedia-app/generic.hypermedia.app/blob/fe0982539e099b870c9503679ddb1153c3aa8f40/src/components/resource-views/alcaeus-resource-viewer.ts#L250-L284 leading to the duplication.

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

No branches or pull requests

2 participants