Skip to content

Commit

Permalink
Merge pull request #176 from cweedall/feature/add-default-desc-props-…
Browse files Browse the repository at this point in the history
…flags-to-config

Add default description and default properties flags to config file
  • Loading branch information
dgarijo authored Apr 18, 2024
2 parents 59c08f2 + 9e5c4c4 commit 8b2e833
Show file tree
Hide file tree
Showing 13 changed files with 531 additions and 360 deletions.
219 changes: 118 additions & 101 deletions docs/configuration_file.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ Below is an example YAML file which may require some changes for your project's
You can find examples in [GitHub](https://github.com/KnowledgeCaptureAndDiscovery/OBA/tree/master/examples)

!!! info
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).

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).

```yaml
#Name of the project
Expand All @@ -25,7 +24,7 @@ openapi:
version: v1.3.0
externalDocs:
description: DBpedia
url: http://dbpedia.org/
url: http://dbpedia.org/
servers:
- url: https://dbpedia.dbpedia.oba.isi.edu/v1.3.0
- url: http://localhost:8080/v1.3.0
Expand All @@ -50,54 +49,56 @@ enable_put_paths: false
classes:
- http://dbpedia.org/ontology/Genre
- http://dbpedia.org/ontology/Band

follow_references: false
```

## Enable/disable generation of a default description for each schema
default_descriptions: true

## Enable/disable generation of default properties (description, id, label, and type) for each schema
default_properties: true
```

## Supported settings

### name

The name of OpenAPI

| Field | Value |
|---|---|
| **Required:** | ``true`` |
| Field | Value |
| ------------- | ------ |
| **Required:** | `true` |

Example:

```yaml
name: dbpedia_music
```


### output_dir

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

| Field | Value |
|---|---|
| **Required:** | ``false`` |
| **Default:** | ``outputs`` |

| Field | Value |
| ------------- | --------- |
| **Required:** | `false` |
| **Default:** | `outputs` |

Example:

```yaml
output_dir: outputs
```


### OpenAPI

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

| Field | Value |
|---|---|
| **Required:** | ``true`` |
| **Type:** | ``OpenAPI`` |

| Field | Value |
| ------------- | --------- |
| **Required:** | `true` |
| **Type:** | `OpenAPI` |

Example:

Expand All @@ -110,56 +111,51 @@ openapi:
version: v1.3.0
externalDocs:
description: DBpedia
url: http://dbpedia.org/
url: http://dbpedia.org/
servers:
- url: https://dbpedia.dbpedia.oba.isi.edu/v1.3.0
- url: http://localhost:8080/v1.3.0
```



### enable_get_paths

Enable the GET method for the paths

| Field | Value |
|---|---|
| **Required:** | ``false`` |
| **Type:** | ``boolean`` |
| **Default:** | ``true`` |
| Field | Value |
| ------------- | --------- |
| **Required:** | `false` |
| **Type:** | `boolean` |
| **Default:** | `true` |

### enable_post_paths:
### enable_post_paths:

Enable the POST method for the paths

| Field | Value |
|---|---|
| **Required:** | ``false`` |
| **Type:** | ``boolean`` |
| **Default:** | ``false`` |

| Field | Value |
| ------------- | --------- |
| **Required:** | `false` |
| **Type:** | `boolean` |
| **Default:** | `false` |

### enable_delete_paths

Enable the DELETE method for the paths

| Field | Value |
|---|---|
| **Required:** | ``false`` |
| **Type:** | ``boolean`` |
| **Default:** | ``false`` |
| Field | Value |
| ------------- | --------- |
| **Required:** | `false` |
| **Type:** | `boolean` |
| **Default:** | `false` |

### enable_put_paths

Enable the PUT method for the paths

| Field | Value |
|---|---|
| **Required:** | ``false`` |
| **Type:** | ``boolean`` |
| **Default:** | ``false`` |


| Field | Value |
| ------------- | --------- |
| **Required:** | `false` |
| **Type:** | `boolean` |
| **Default:** | `false` |

### endpoint

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

### endpoint.url

The url of the SPARQL Endpoint

| Field | Value |
|---|---|
| **Required:** | ``true`` |
| **Type:** | ``url`` |
The url of the SPARQL Endpoint

| Field | Value |
| ------------- | ------ |
| **Required:** | `true` |
| **Type:** | `url` |

Example:

```yaml
url: http://dbpedia.org/sparql
url: http://dbpedia.org/sparql
```


### endpoint.prefix


The prefix of the SPARQL Endpoint.
This is useful when you create a new resource.

| Field | Value |
|---|---|
| **Required:** | ``true`` |
| **Type:** | ``url`` |

| Field | Value |
| ------------- | ------ |
| **Required:** | `true` |
| **Type:** | `url` |

Example:

```yaml
prefix: http://dbpedia.org/resource
prefix: http://dbpedia.org/resource
```


### endpoint.graph_base

OBA uses a graph to store the user contents on a personal namespace.

| Field | Value |
|---|---|
| **Required:** | ``true`` |
| **Type:** | ``url`` |
OBA uses a graph to store the user contents on a personal namespace.

| Field | Value |
| ------------- | ------ |
| **Required:** | `true` |
| **Type:** | `url` |

Example:

```yaml
graph_base: http://ontosoft.isi.edu:3030/modelCatalog-1.2.0/data/
graph_base: http://ontosoft.isi.edu:3030/modelCatalog-1.2.0/data/
```


## ontologies

Example:
Expand All @@ -236,17 +225,18 @@ Example:
ontologies:
- https://tinyurl.com/dbpediaoba
```
| Field | Value |
|---|---|
| **Required:** | ``true`` |
| **Type:** | ``List[string]`` |

| Field | Value |
| ------------- | -------------- |
| **Required:** | `true` |
| **Type:** | `List[string]` |

## custom_queries_directory

| Field | Value |
|---|---|
| **Required:** | ``false`` |
| **Type:** | ``List[Path]`` |
| Field | Value |
| ------------- | ------------ |
| **Required:** | `false` |
| **Type:** | `List[Path]` |

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

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

### classes

| Field | Value |
|---|---|
| **Required:** | ``false`` |
| **Type:** | ``List[URI]`` |
| Field | Value |
| ------------- | ----------- |
| **Required:** | `false` |
| **Type:** | `List[URI]` |

```yaml
classes:
Expand All @@ -269,31 +259,60 @@ classes:

### follow_references

| Field | Value |
|---|---|
| **Required:** | ``false`` |
| **Type:** | ``Boolean`` |
| **Default:** | ``True`` |

| Field | Value |
| ------------- | --------- |
| **Required:** | `false` |
| **Type:** | `Boolean` |
| **Default:** | `True` |

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

```yaml
follow_references: false
```

### default_descriptions

Enable/disable generation of a default description for each schema.

| Field | Value |
| ------------- | --------- |
| **Required:** | `false` |
| **Type:** | `Boolean` |
| **Default:** | `True` |

For more information, go to [filtering classes](filtering.md#default_descriptions)

```yaml
default_descriptions: false
```

### default_properties

Enable/disable generation of default properties (description, id, label, and type) for each schema.

| Field | Value |
| ------------- | --------- |
| **Required:** | `false` |
| **Type:** | `Boolean` |
| **Default:** | `True` |

For more information, go to [filtering classes](filtering.md#default_properties)

```yaml
default_properties: false
```

## auth

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


### provider

| Field | Value |
|---|---|
| **Required:** | ``true`` |
| **Type:** | ``str`` |
| Field | Value |
| ------------- | ------ |
| **Required:** | `true` |
| **Type:** | `str` |

The providers supported:

Expand All @@ -314,12 +333,10 @@ firebase:

To authenticate a service account and authorize it to access Firebase services, you must generate a private key file.



| Field | Value |
|---|---|
| **Required:** | ``true`` |
| **Type:** | ``str`` |
| Field | Value |
| ------------- | ------ |
| **Required:** | `true` |
| **Type:** | `str` |

```
firebase:
Expand Down
Loading

0 comments on commit 8b2e833

Please sign in to comment.