OpenAPI Enricher
Description
OpenAPI Enricher is a particular type of enricher which uses Open API standard for inter-systems commmunication. It is autogenerated by Nussknacker based on the OpenAPI interface definition. You need to configure OpenAPI integration to have this component available in the Component Palette.
In this documentation, record is a neutral term used across all processing modes.
In purely streaming contexts, we typically use term event - that simply means a record with a timestamp, which lets Nussknacker apply time-based processing logic.
Parameters and configuration
| Name | Description |
|---|---|
| OperationId | Id of the OpenAPI operation, as defined in the interface definition |
| Input parameters | An entry field for each of the operation's input parameters. Nussknacker validates the data type of each entry field against the OpenAPI interface definition. |
| Output variable name | This variable will contain the result of OpenAPI service call |
Advanced parameters
| Name | Description |
|---|---|
| Error Strategy | Defines how OpenAPI call errors are handled. Accept Only 2xx fails node execution for any non-2xx response. Accept 2xx and 404 (default) treats responses 404 status code as an empty (null) result and fails node execution for other non-2xx responses. Accept All never fails node execution and returns a wrapped result in the output variable. |
Error handling output
When Error Strategy is set to Accept All, the output variable is a record with:
| Field | Description |
|---|---|
| error | true for failed call, false for successful call |
| errorMessage | Error description for failed call |
| successResponse | OpenAPI response for successful call |
| statusCode | Optional HTTP status code for successful and failed calls (present when available) |
statusCode can be empty in some failure cases, when the underlying exception does not expose an HTTP status.
Note that with Accept All every non-2xx response — including 404 — is reported as error = true; the
404-as-empty-result interpretation applies only to the Accept 2xx and 404 strategy.