diff --git a/config/dispatcher/dispatcher.ex b/config/dispatcher/dispatcher.ex index dc3ac57..985e090 100644 --- a/config/dispatcher/dispatcher.ex +++ b/config/dispatcher/dispatcher.ex @@ -187,6 +187,9 @@ defmodule Dispatcher do Proxy.forward conn, path, "http://cache/site-types/" end + match "/request-reasons/*path", %{ accept: [:json], layer: :api} do + Proxy.forward conn, path, "http://cache/request-reasons/" + end ############### # LOGIN diff --git a/config/migrations/20211119151700-move-reason-codes.sparql b/config/migrations/20211119151700-move-reason-codes.sparql new file mode 100644 index 0000000..1aa262a --- /dev/null +++ b/config/migrations/20211119151700-move-reason-codes.sparql @@ -0,0 +1,14 @@ +DELETE { + GRAPH { + ?s ?p ?o + } +} INSERT { + GRAPH { + ?s ?p ?o + } +} WHERE { + GRAPH { + ?s a ; + ?p ?o. + } +} \ No newline at end of file diff --git a/config/resources/domain.lisp b/config/resources/domain.lisp index a0faba9..ac4d7d6 100644 --- a/config/resources/domain.lisp +++ b/config/resources/domain.lisp @@ -12,4 +12,5 @@ (defparameter *supply-cache-headers-p* t) (read-domain-file "domain.json") -(read-domain-file "auth.json") \ No newline at end of file +(read-domain-file "auth.json") +(read-domain-file "privacy-centric-service.json") \ No newline at end of file diff --git a/config/resources/privacy-centric-service.json b/config/resources/privacy-centric-service.json new file mode 100644 index 0000000..1846fe1 --- /dev/null +++ b/config/resources/privacy-centric-service.json @@ -0,0 +1,20 @@ +{ + "version": "0.1", + "prefixes": { + "skos": "http://www.w3.org/2004/02/skos/core#", + "ext": "http://mu.semte.ch/vocabularies/ext/" + }, + "resources": { + "request-reasons": { + "name": "request-reason", + "class": "ext:ReasonCode", + "attributes": { + "label": { + "type": "string", + "predicate": "skos:prefLabel" + } + }, + "new-resource-base": "http://data.lblod.info/id/information-request-reason/" + } + } +}