From a498f4ca58c7a2874fa5efc6b3e0c2c53195c96b Mon Sep 17 00:00:00 2001 From: Chris Wilkinson Date: Fri, 22 Nov 2019 16:14:59 +0000 Subject: [PATCH] Define hydra:collection as a supported property on the entry point --- src/routes/api-documentation.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/routes/api-documentation.ts b/src/routes/api-documentation.ts index 2c6f3f69..681aacca 100644 --- a/src/routes/api-documentation.ts +++ b/src/routes/api-documentation.ts @@ -1,7 +1,7 @@ import Router from '@koa/router'; import { Context, Middleware, Next } from 'koa'; import { - hydra, owl, rdfs, schema, + hydra, owl, rdf, rdfs, schema, } from 'rdf-namespaces'; import Routes from './index'; @@ -35,6 +35,14 @@ export default (router: Router): Middleware => ( [hydra.readable]: true, [hydra.writeable]: false, }, + { + '@type': hydra.SupportedProperty, + [hydra.title]: { '@value': 'Collection', '@language': 'en' }, + [hydra.property]: { '@id': hydra.collection, '@type': [rdf.Property, hydra.Link] }, + [hydra.required]: true, + [hydra.readable]: true, + [hydra.writeable]: false, + }, ], }, {