Skip to content

Commit

Permalink
Add sample config for openapi spec to rtd
Browse files Browse the repository at this point in the history
  • Loading branch information
oliwel committed Jan 26, 2021
1 parent 2c5eb14 commit 224a569
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion doc/subsystems/rpc-openapi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ This is not really an own subsystem but it offers an auto-generated `OpenAPI <ht

To generate the OpenAPI spec according to your current RPC configuration see :ref:`openapi-rpc-method`.

The `info` block of the specification is by default set to contain a generic `title` and inherits the `version` number from `system.config.api` (as obtained by the `version` API call). To provide your own values for the info block, add a section `[openapi]` to the RPC wrapper configuration and set the expected values.
The `info` block of the specification is by default set to contain a generic `title` and inherits the `version` number from `system.config.api` (as obtained by the `version` API call). To provide your own values for the info block, add a section `[openapi]` to the RPC wrapper configuration and set the expected values::

[openapi]
title = Public Certificate Reqest API
description = Request, Renew and Revoke your Certificates her
version = 42.1


The data types of all relevant input/output parameters of those workflows exposed via RPC must be defined (in the workflow config) to be able to generate the OpenAPI spec. For details see :ref:`openapi-workflow-field-param`.
2 changes: 1 addition & 1 deletion doc/subsystems/rpc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ code set in the return structure. The error codes consist of five digits,
the first three digits are derived from the HTTP status codes followed by
two digits for unambiguousness.

To let the wrapper send the error code on HTTP layer, you need to set
To let the wrapper send the error code on HTTP layer, you need to set::

[output]
use_http_status_codes=1
Expand Down

0 comments on commit 224a569

Please sign in to comment.