Configuration

Configuration options let you:

  • Opt out of high-level features (e.g. OpenAPI AutoDocumentation)

  • Handle OpeanAPI MetaData (e.g. API title, version, description, etc.)

They are prefixed with JEROBOAM_ to avoid name collisions with other packages.

Content

General Options

General Options let you opt out of some of the Flask-Jeroboam’s features, in case you don’t need them, need to customize, or if they are interfering with the rest of your app.

JEROBOAM_REGISTER_OPENAPI

It controls whether the OpenAPI Blueprint will be registered when you call the init_app method on the app instance.

Set to False if you don’t want the OpenAPI Blueprint to be registered or if you want to plug in your own view functions to serve OpenAPI functionnalities.

Default: True

JEROBOAM_REGISTER_ERROR_HANDLERS

It controls whether package-defined error handlers of Flask-Jeroboam’s Exceptions will be registered when you call the init_app method on the app instance.

Set to False if you don’t want the package-defined error handlers registered. Note that if you do this, you will need to define your own error handlers for the following exception: RessourceNotFound, InvalidRequest and ResponseValidationError.

Default: True

OpenAPI MetaData

OpenAPI MetaData Configuration options let you control the MetaData of your OpenAPI Documentation, like its title, versions, contact information, etc… Setting these is optional, meaning you will have an OpenAPI page up and running before setting these options.

JEROBOAM_TITLE

The title of your API. It will appear as the main title of your OpenAPI documentation page.

Default: app.name

JEROBOAM_VERSION

The version of your API. Not to be mistaken with the OPENAPI version. It will appear in the small grey tag next to your title.

Default: 0.1.0

JEROBOAM_DESCRIPTION

A short description of your API. It will appear in the small grey tag next to your title.

Default: None

JEROBOAM_TERMS_OF_SERVICE

A link to the terms of service of your API. It will appear in the footer of your OpenAPI documentation page.

Default: None

JEROBOAM_CONTACT

A dictionary containing the contact information of your API. It will appear in the footer of your OpenAPI documentation page.

Default: None

JEROBOAM_LICENCE_INFO

A dictionary containing the licence information of your API. It will appear in the footer of your OpenAPI documentation page.

Default: None

JEROBOAM_OPENAPI_VERSION

The version of the OpenAPI specification that your API is compliant with. It will appear in the footer of your OpenAPI documentation page.

Default: 3.0.2

JEROBOAM_SERVERS

A list of dictionaries containing the servers that your API is available on. It will appear in the footer of your OpenAPI documentation page.

Default: []

JEROBOAM_OPENAPI_URL

The URL of your OpenAPI documentation page.

Default: /docs