Add a new /request-reasons endpoint (#70)

This can be used to retrieve all the possible options.
This commit is contained in:
Sam Van Campenhout
2021-11-23 15:45:42 +01:00
committed by GitHub
parent 8c7ba7afec
commit b6e1458d8a
4 changed files with 39 additions and 1 deletions

View File

@@ -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

View File

@@ -0,0 +1,14 @@
DELETE {
GRAPH <http://mu.semte.ch/application> {
?s ?p ?o
}
} INSERT {
GRAPH <http://mu.semte.ch/graphs/contacthub/141d9d6b-54af-4d17-b313-8d1c30bc3f5b/ChAdmin> {
?s ?p ?o
}
} WHERE {
GRAPH <http://mu.semte.ch/application> {
?s a <http://mu.semte.ch/vocabularies/ext/ReasonCode>;
?p ?o.
}
}

View File

@@ -12,4 +12,5 @@
(defparameter *supply-cache-headers-p* t)
(read-domain-file "domain.json")
(read-domain-file "auth.json")
(read-domain-file "auth.json")
(read-domain-file "privacy-centric-service.json")

View File

@@ -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/"
}
}
}