Section – OpenAPI

ON/OFF radio buttons:

  • To enable OpenAPI spec enforcement for a mapping, set the radio button to ON. By default, OpenAPI is OFF (disabled).

UI

Description

Entry path

A pattern matching the full request path.

Default value: .* (matches all requests)

Example: ^%ENTRYDIR%/api/

If the entry path of the mapping is a directory, variables like %ENTRYDIR% can be used to indicate that the expression matches the start of the path. Variables are not allowed if the entry path is defined as a regular expression (configured on the Tab – Basic of this mapping).

Note: The rules are evaluated sequentially until a matching rule is found. Only the matching rule is then executed. If no rule matches, nothing is validated.

API

Either choose an OpenAPI specification uploaded via Submenu – API Security or set to No validation if the requests matching this Entry path must not be validated.

Path Matching

Default value: Client view

The Gateway mapping can be configured to rewrite the incoming URL to a different back-end URL (asymmetric mappings). Due to this rewriting, the incoming URL path (Client view) will be different from the back-end URL path (Back-end view).

Select either Client view or Back-end view to match the URL path according to the path in your API specifications.

Log only

If enabled potential attack requests are only logged but not blocked.

Check responses

Default value: Off

Choose how API responses should be validated:

  • Strict: The response must be valid according to the specification. If the response is not declared in the specification, validation fails.
  • Lax: The response must be valid according to the specification. If the response is not declared in the specification, the response is not validated.
  • Off: API responses are never validated.

Offer API specification file publicly

Allow the API specification files to be downloaded by external clients.

The download path of the API specification is composed as follows:

  • %ENTRYDIR%/[PUBLISH_PATH_PREFIX/]API_NAME-openapi.json

  • %ENTRYDIR%
    corresponds to the entry path of the current mapping.
  • PUBLISH_PATH_PREFIX
    corresponds to the content of the field Publish path prefix (optional, see below).
  • API_NAME
    is the file name of the spec as displayed in the API dropdown.
  • -openapi.json
    is added at the end.

Example
The settings shown in the screenshot above result in the download path:
%ENTRYDIR%/spec/payment-openapi.json

Publish path prefix

Affects the URL under which the API specification files are available for download externally. Note that the entry path will be added in front of it.

Example: spec