You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So, this might tie into my earlier question about apiDocumentation (#259). I'm currently attempting to map from memberAssertion to supported properties. How is this expected to be done in Alcaeus?
The text was updated successfully, but these errors were encountered:
If I understood correctly, you'd want to do smth like finding the supported properties of types used in member assertion?
Here's an example using Alcaeus' object model
constclient=require("[email protected]/node").Hydraconst{ rdf }=require('@tpluscode/rdf-ns-builders')const{representation: {root: collection}}=awaitclient.loadResource('https://always-read-the-plaque.herokuapp.com/plaques');constapiDoc=client.apiDocumentations[0].root// find hydra:object of member assertions for rdf:typeconsttypes=collection.memberAssertion.filter(ma=>ma.property.equals(rdf.type)).map(ma=>ma.object)// create a map of [type URI, properties]types.map(type=>{consttypeResource=apiDoc.supportedClass.find(sc=>sc.equals(type))return[type.id,typeResource ? typeResource.supportedProperty : []]})
This returns empty in the example because of subclassing. The supported class is a subclass of the type from member assertion
So, this might tie into my earlier question about
apiDocumentation
(#259). I'm currently attempting to map frommemberAssertion
tosupported properties
. How is this expected to be done in Alcaeus?The text was updated successfully, but these errors were encountered: