Page History
Blueriq makes it possible to generate an OpenApi OpenAPI feed based on your Blueriq REST Services and Exposed Function Flows. OpenApi OpenAPI (previously know known as Swagger) comes with multiple specifications for defining RESTful interfaces. Blueriq chooses to generate a feed for OAS 3.0.
OpenAPI and the model in Encore
Read more about how information from the model is mapped to the OpenAPI feed here.
REST Services
The interfaces for REST services can be found at the following locations:
1. Project URL
This feed contains information of all operations as defined in REST services that are exposed as webservice by the requested project.
{runtime-url}/server/rest/docs?project={project}&version={version}
Both project and and version parameters parameters are required. {runtime-url}The OpenAPI version is optional.
Examples:
...
The shortcut parameter is required.
Example:
- project=studio-BaarsErrorHandling-BAARS&version=0.0-Trunk
- http://localhost:160/runtime/server/rest/docs?project=export-BAARS&version=0.0-Trunk&spec=3.1
2. Shortcut URL
This feed contains information of all operations as defined in REST services that are exposed as webservice by the requested project or shortcut.
Documentation
In the REST service editor, each operation has a field for documentation that will be used in the OpenApi feed as the description of the corresponding Operation. The properties of the request/response body schema may be documented in the corresponding Domain Schema per attribute and relation.
shortcut.
{runtime-url}/server/rest/docs?shortcut={shortcut}
The shortcut parameter is required.
Tip |
---|
You may also use the development dashboard to copy the OpenAPI spec URL in the widget named "Exposed Blueriq webservices": Beware that you need both a "reload all projects" and a refresh of the browser for your new project to appear in the list. |
...
Function Flows
The OpenApi OpenAPI feeds for Function Flows that are exposed as webservice are located at:
...
Each Function Flow that is exposed as webservice by the requested project is considered as Operation in the OpenApi OpenAPI interface.
Info |
---|
If the property |
...
|
...
is set and the Runtime is running in production mode, the project feed will throw a forbidden exception. |
Documentation
In the Function tab of a Function Flow, you have the ability to specify documentation for the function in general and for each input and output parameter.
The general function documentation is available in the OpenApi feed as the description of the operation. The parameter's documentation is specified in the OpenApi feed in the body schema definition.
Supported OpenAPI versions
Blueriq supports multiple versions of the OpenAPI specification. By default, version 3.1 of the specification is used, but the optional spec
query parameter can be used to request different versions:
spec query parameter value | OpenAPI version |
---|---|
3 | 3.1.0 |
3.0 | 3.0.3 |
3.1 | 3.1.0 |
...