Skip to content

Commit 8b2e833

Browse files
authored
Merge pull request #176 from cweedall/feature/add-default-desc-props-flags-to-config
Add default description and default properties flags to config file
2 parents 59c08f2 + 9e5c4c4 commit 8b2e833

File tree

13 files changed

+531
-360
lines changed

13 files changed

+531
-360
lines changed

docs/configuration_file.md

Lines changed: 118 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ Below is an example YAML file which may require some changes for your project's
77
You can find examples in [GitHub](https://github.com/KnowledgeCaptureAndDiscovery/OBA/tree/master/examples)
88

99
!!! info
10-
If you experience any issues when using OBA, or if you would like us to support additional exciting features, please open an issue on our [GitHub repository](https://github.com/KnowledgeCaptureAndDiscovery/OBA/issues).
11-
10+
If you experience any issues when using OBA, or if you would like us to support additional exciting features, please open an issue on our [GitHub repository](https://github.com/KnowledgeCaptureAndDiscovery/OBA/issues).
1211

1312
```yaml
1413
#Name of the project
@@ -25,7 +24,7 @@ openapi:
2524
version: v1.3.0
2625
externalDocs:
2726
description: DBpedia
28-
url: http://dbpedia.org/
27+
url: http://dbpedia.org/
2928
servers:
3029
- url: https://dbpedia.dbpedia.oba.isi.edu/v1.3.0
3130
- url: http://localhost:8080/v1.3.0
@@ -50,54 +49,56 @@ enable_put_paths: false
5049
classes:
5150
- http://dbpedia.org/ontology/Genre
5251
- http://dbpedia.org/ontology/Band
52+
5353
follow_references: false
54-
```
5554

55+
## Enable/disable generation of a default description for each schema
56+
default_descriptions: true
57+
58+
## Enable/disable generation of default properties (description, id, label, and type) for each schema
59+
default_properties: true
60+
```
5661
5762
## Supported settings
5863
5964
### name
6065
6166
The name of OpenAPI
6267
63-
| Field | Value |
64-
|---|---|
65-
| **Required:** | ``true`` |
68+
| Field | Value |
69+
| ------------- | ------ |
70+
| **Required:** | `true` |
6671

6772
Example:
6873

6974
```yaml
7075
name: dbpedia_music
7176
```
7277

73-
7478
### output_dir
7579

7680
The output directory of the OpenApi specification files, relative to the root of the project.
7781

78-
| Field | Value |
79-
|---|---|
80-
| **Required:** | ``false`` |
81-
| **Default:** | ``outputs`` |
82-
82+
| Field | Value |
83+
| ------------- | --------- |
84+
| **Required:** | `false` |
85+
| **Default:** | `outputs` |
8386

8487
Example:
8588

8689
```yaml
8790
output_dir: outputs
8891
```
8992

90-
9193
### OpenAPI
9294

9395
Basic information of API using OpenAPI Spec.
9496
More info: [OpenAPI Base file](https://swagger.io/docs/specification/basic-structure/)
9597

96-
| Field | Value |
97-
|---|---|
98-
| **Required:** | ``true`` |
99-
| **Type:** | ``OpenAPI`` |
100-
98+
| Field | Value |
99+
| ------------- | --------- |
100+
| **Required:** | `true` |
101+
| **Type:** | `OpenAPI` |
101102

102103
Example:
103104

@@ -110,56 +111,51 @@ openapi:
110111
version: v1.3.0
111112
externalDocs:
112113
description: DBpedia
113-
url: http://dbpedia.org/
114+
url: http://dbpedia.org/
114115
servers:
115116
- url: https://dbpedia.dbpedia.oba.isi.edu/v1.3.0
116117
- url: http://localhost:8080/v1.3.0
117118
```
118119

119-
120-
121120
### enable_get_paths
122121

123122
Enable the GET method for the paths
124123

125-
| Field | Value |
126-
|---|---|
127-
| **Required:** | ``false`` |
128-
| **Type:** | ``boolean`` |
129-
| **Default:** | ``true`` |
124+
| Field | Value |
125+
| ------------- | --------- |
126+
| **Required:** | `false` |
127+
| **Type:** | `boolean` |
128+
| **Default:** | `true` |
130129

131-
### enable_post_paths:
130+
### enable_post_paths:
132131

133132
Enable the POST method for the paths
134133

135-
| Field | Value |
136-
|---|---|
137-
| **Required:** | ``false`` |
138-
| **Type:** | ``boolean`` |
139-
| **Default:** | ``false`` |
140-
134+
| Field | Value |
135+
| ------------- | --------- |
136+
| **Required:** | `false` |
137+
| **Type:** | `boolean` |
138+
| **Default:** | `false` |
141139

142140
### enable_delete_paths
143141

144142
Enable the DELETE method for the paths
145143

146-
| Field | Value |
147-
|---|---|
148-
| **Required:** | ``false`` |
149-
| **Type:** | ``boolean`` |
150-
| **Default:** | ``false`` |
144+
| Field | Value |
145+
| ------------- | --------- |
146+
| **Required:** | `false` |
147+
| **Type:** | `boolean` |
148+
| **Default:** | `false` |
151149

152150
### enable_put_paths
153151

154152
Enable the PUT method for the paths
155153

156-
| Field | Value |
157-
|---|---|
158-
| **Required:** | ``false`` |
159-
| **Type:** | ``boolean`` |
160-
| **Default:** | ``false`` |
161-
162-
154+
| Field | Value |
155+
| ------------- | --------- |
156+
| **Required:** | `false` |
157+
| **Type:** | `boolean` |
158+
| **Default:** | `false` |
163159

164160
### endpoint
165161

@@ -170,64 +166,57 @@ endpoint:
170166
url: http://dbpedia.org/sparql
171167
prefix: http://dbpedia.org/resource
172168
# Add the GRAPH clause. Enable it when you are using authentication.
173-
# OBA uses a graph to store the user contents on a personal namespace.
169+
# OBA uses a graph to store the user contents on a personal namespace.
174170
# For DBpedia, dont use it.
175-
graph: http://endpoint.mint.isi.edu/modelCatalog-1.4.0/data/
171+
graph: http://endpoint.mint.isi.edu/modelCatalog-1.4.0/data/
176172
```
177173

178174
### endpoint.url
179175

180-
The url of the SPARQL Endpoint
181-
182-
| Field | Value |
183-
|---|---|
184-
| **Required:** | ``true`` |
185-
| **Type:** | ``url`` |
176+
The url of the SPARQL Endpoint
186177

178+
| Field | Value |
179+
| ------------- | ------ |
180+
| **Required:** | `true` |
181+
| **Type:** | `url` |
187182

188183
Example:
189184

190185
```yaml
191-
url: http://dbpedia.org/sparql
186+
url: http://dbpedia.org/sparql
192187
```
193188

194-
195189
### endpoint.prefix
196190

197-
198191
The prefix of the SPARQL Endpoint.
199192
This is useful when you create a new resource.
200193

201-
| Field | Value |
202-
|---|---|
203-
| **Required:** | ``true`` |
204-
| **Type:** | ``url`` |
205-
194+
| Field | Value |
195+
| ------------- | ------ |
196+
| **Required:** | `true` |
197+
| **Type:** | `url` |
206198

207199
Example:
208200

209201
```yaml
210-
prefix: http://dbpedia.org/resource
202+
prefix: http://dbpedia.org/resource
211203
```
212204

213-
214205
### endpoint.graph_base
215206

216-
OBA uses a graph to store the user contents on a personal namespace.
217-
218-
| Field | Value |
219-
|---|---|
220-
| **Required:** | ``true`` |
221-
| **Type:** | ``url`` |
207+
OBA uses a graph to store the user contents on a personal namespace.
222208

209+
| Field | Value |
210+
| ------------- | ------ |
211+
| **Required:** | `true` |
212+
| **Type:** | `url` |
223213

224214
Example:
225215

226216
```yaml
227-
graph_base: http://ontosoft.isi.edu:3030/modelCatalog-1.2.0/data/
217+
graph_base: http://ontosoft.isi.edu:3030/modelCatalog-1.2.0/data/
228218
```
229219

230-
231220
## ontologies
232221

233222
Example:
@@ -236,17 +225,18 @@ Example:
236225
ontologies:
237226
- https://tinyurl.com/dbpediaoba
238227
```
239-
| Field | Value |
240-
|---|---|
241-
| **Required:** | ``true`` |
242-
| **Type:** | ``List[string]`` |
228+
229+
| Field | Value |
230+
| ------------- | -------------- |
231+
| **Required:** | `true` |
232+
| **Type:** | `List[string]` |
243233

244234
## custom_queries_directory
245235

246-
| Field | Value |
247-
|---|---|
248-
| **Required:** | ``false`` |
249-
| **Type:** | ``List[Path]`` |
236+
| Field | Value |
237+
| ------------- | ------------ |
238+
| **Required:** | `false` |
239+
| **Type:** | `List[Path]` |
250240

251241
[Go to how to add custom queries](adding_custom_queries.md) for more information
252242

@@ -256,10 +246,10 @@ Some ontologies contain numerous classes. However, you can be interested in a su
256246

257247
### classes
258248

259-
| Field | Value |
260-
|---|---|
261-
| **Required:** | ``false`` |
262-
| **Type:** | ``List[URI]`` |
249+
| Field | Value |
250+
| ------------- | ----------- |
251+
| **Required:** | `false` |
252+
| **Type:** | `List[URI]` |
263253

264254
```yaml
265255
classes:
@@ -269,31 +259,60 @@ classes:
269259

270260
### follow_references
271261

272-
| Field | Value |
273-
|---|---|
274-
| **Required:** | ``false`` |
275-
| **Type:** | ``Boolean`` |
276-
| **Default:** | ``True`` |
277-
262+
| Field | Value |
263+
| ------------- | --------- |
264+
| **Required:** | `false` |
265+
| **Type:** | `Boolean` |
266+
| **Default:** | `True` |
278267

279268
For more information, go to [filtering classes](filtering.md#following-references)
280269

281270
```yaml
282271
follow_references: false
283272
```
284273

274+
### default_descriptions
275+
276+
Enable/disable generation of a default description for each schema.
277+
278+
| Field | Value |
279+
| ------------- | --------- |
280+
| **Required:** | `false` |
281+
| **Type:** | `Boolean` |
282+
| **Default:** | `True` |
283+
284+
For more information, go to [filtering classes](filtering.md#default_descriptions)
285+
286+
```yaml
287+
default_descriptions: false
288+
```
289+
290+
### default_properties
291+
292+
Enable/disable generation of default properties (description, id, label, and type) for each schema.
293+
294+
| Field | Value |
295+
| ------------- | --------- |
296+
| **Required:** | `false` |
297+
| **Type:** | `Boolean` |
298+
| **Default:** | `True` |
299+
300+
For more information, go to [filtering classes](filtering.md#default_properties)
301+
302+
```yaml
303+
default_properties: false
304+
```
285305

286306
## auth
287307

288308
Add login to the API and add security to the following methods: `POST`, `PUT` and `DELETE`
289309

290-
291310
### provider
292311

293-
| Field | Value |
294-
|---|---|
295-
| **Required:** | ``true`` |
296-
| **Type:** | ``str`` |
312+
| Field | Value |
313+
| ------------- | ------ |
314+
| **Required:** | `true` |
315+
| **Type:** | `str` |
297316

298317
The providers supported:
299318

@@ -314,12 +333,10 @@ firebase:
314333
315334
To authenticate a service account and authorize it to access Firebase services, you must generate a private key file.
316335
317-
318-
319-
| Field | Value |
320-
|---|---|
321-
| **Required:** | ``true`` |
322-
| **Type:** | ``str`` |
336+
| Field | Value |
337+
| ------------- | ------ |
338+
| **Required:** | `true` |
339+
| **Type:** | `str` |
323340
324341
```
325342
firebase:

0 commit comments

Comments
 (0)