Skip to content

Configuration File

OBA supports configuring your documentation builds with a YAML file.

Below is an example YAML file which may require some changes for your project's configuration:

You can find examples in GitHub

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.

#Name of the project
name: dbpedia_music

## OpenAPI Section
### Name, version and URL of the OpenAPI
### For more information about the section. Go to the official documentation
openapi:
  openapi: 3.0.1
  info:
    description: This is the API of the DBpedia Ontology
    title: DBpedia
    version: v1.3.0
  externalDocs:
    description: DBpedia
    url:  http://dbpedia.org/
  servers:
    - url: https://dbpedia.dbpedia.oba.isi.edu/v1.3.0
    - url: http://localhost:8080/v1.3.0

## Ontologies
### List of ontologies
ontologies:
  - https://tinyurl.com/dbpediaoba

## SPARQL information
endpoint:
  url: http://dbpedia.org/sparql
  prefix: http://dbpedia.org/resource

## Filter the paths by methods
enable_get_paths: true
enable_post_paths: false
enable_delete_paths: false
enable_put_paths: false

## Select the classes to add in the API
classes:
  - http://dbpedia.org/ontology/Genre
  - http://dbpedia.org/ontology/Band
follow_references: false

Supported settings

name

The name of OpenAPI

Field Value
Required: true

Example:

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

Example:

output_dir: outputs

OpenAPI

Basic information of API using OpenAPI Spec. More info: OpenAPI Base file

Field Value
Required: true
Type: OpenAPI

Example:

openapi:
  openapi: 3.0.1
  info:
    description: This is the API of the DBpedia Ontology
    title: DBpedia
    version: v1.3.0
  externalDocs:
    description: DBpedia
    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

enable_post_paths:

Enable the POST method for the paths

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

enable_put_paths

Enable the PUT method for the paths

Field Value
Required: false
Type: boolean
Default: false

endpoint

Example

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. 
  # For DBpedia, dont use it.
  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

Example:

  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

Example:

  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

Example:

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

ontologies

Example:

ontologies:
  - https://tinyurl.com/dbpediaoba
Field Value
Required: true
Type: List[string]

custom_queries_directory

Field Value
Required: false
Type: List[Path]

Go to how to add custom queries for more information

filtering

Some ontologies contain numerous classes. However, you can be interested in a subgroup. OBA can filter the classes.

classes

Field Value
Required: false
Type: List[URI]
classes:
  - http://dbpedia.org/ontology/Genre
  - http://dbpedia.org/ontology/Band

follow_references

Field Value
Required: false
Type: Boolean
Default: True

For more information, go to filtering classes

follow_references: 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

The providers supported:

  • Firebase

Providers

firebase

You can use firebase to login

firebase:
  key: google_key

firebase.key

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
firebase:
  key: google_key