-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathconfig.yaml
176 lines (176 loc) · 5.19 KB
/
config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
openapi: 3.0.2
info:
title: 'Example site'
version: 0.1.0
x-walder-resources:
root: ./
views: views
pipe-modules: pipeModules
public: public
x-walder-datasources:
- http://fragments.dbpedia.org/2016-04/en
paths:
/music/{musician}:
get:
summary: Returns a list of songs of the given musician.
parameters:
- in: path
name: musician
required: true
schema:
type: string
description: The target musician
x-walder-query:
graphql-query: >
{
label @single
artist(label_en: $musician)
}
json-ld-context: >
{
"@context": {
"label": "http://www.w3.org/2000/01/rdf-schema#label",
"label_en": { "@id": "http://www.w3.org/2000/01/rdf-schema#label", "@language": "en" },
"writer": "http://dbpedia.org/ontology/writer",
"artist": "http://dbpedia.org/ontology/musicalArtist"
}
}
responses:
200:
description: list of songs
x-walder-input-text/html: songs.handlebars
/artist/{artist}:
get:
summary: Returns a list of a given artist's songs written by a specific person.
parameters:
- in: path
name: artist
required: true
schema:
type: string
description: The target artist
- in: query
name: writer
required: true
schema:
type: string
x-walder-query:
graphql-query: >
{
label @single
writer(label: $writer) @single
artist @single(scope: all) {
label(_:$artist)
}
}
json-ld-context: >
{
"@context": {
"label": { "@id": "http://www.w3.org/2000/01/rdf-schema#label", "@language": "en" },
"writer": "http://dbpedia.org/ontology/writer",
"artist": "http://dbpedia.org/ontology/musicalArtist"
}
}
responses:
200:
description: list of songs
x-walder-input-text/html: artist-writer.pug
/bradpitt-directors:
get:
summary: Returns a list of directors of movies starring Brad Pitt
x-walder-query:
graphql-query: >
{
director @single(scope: all) {
label
}
starring(label_en: "Brad Pitt") @single
}
json-ld-context: >
{
"@context": {
"label": "http://www.w3.org/2000/01/rdf-schema#label",
"label_en": { "@id": "http://www.w3.org/2000/01/rdf-schema#label", "@language": "en" },
"director": "http://dbpedia.org/ontology/director",
"starring": "http://dbpedia.org/ontology/starring"
}
}
responses:
200:
description: list of directors of movies starring Brad Pitt
x-walder-input-text/html: directors.pug
/music/{artist}/postprocessed:
get:
summary: Returns a list of the all songs of a given artist, only keeping those with titles containing 'star'.
parameters:
- in: path
name: artist
required: true
schema:
type: string
description: The target artist
x-walder-query:
graphql-query: >
{
label @single
artist {
label(_:$artist)
}
}
json-ld-context: >
{
"@context": {
"label": { "@id": "http://www.w3.org/2000/01/rdf-schema#label", "@language": "en" },
"artist": "http://dbpedia.org/ontology/musicalArtist"
}
}
x-walder-postprocessing:
filterT:
source: filterT.js
responses:
200:
description: list of songs
x-walder-input-text/html: artist-writer.pug
/movies/{actor}/postprocessed_with_variables:
get:
summary: Returns a list of the all movies the given actor stars in, filtered on movie titles containing 'A' and 'T'
parameters:
- in: path
name: actor
required: true
schema:
type: string
description: The target actor
x-walder-query:
graphql-query: >
{
id @single
... on Film {
starring(label: $actor) @single
}
}
json-ld-context: >
{
"@context": {
"Film": "http://dbpedia.org/ontology/Film",
"label": { "@id": "http://www.w3.org/2000/01/rdf-schema#label", "@language": "en" },
"starring": "http://dbpedia.org/ontology/starring"
}
}
x-walder-postprocessing:
filterT_withParameters:
source: filterT_withParameters.js
parameters:
- _data
- true
responses:
200:
description: list of movies
x-walder-input-text/html: movies.pug
x-walder-errors:
404:
description: page not found error
x-walder-input-text/html: error404.html
500:
description: internal server error
x-walder-input-text/html: error500.html