OpenAPI Document Patterns
You can use the REST Adapter to implement the following common patterns using OpenAPI documents.
Publish REST-Based Integrations as OpenAPI Documents
You can publish an OpenAPI document describing an Oracle Integration REST endpoint and consume the OpenAPI document using the REST Adapter. This section provides an overview of the configuration steps.
Consume and Publish OpenAPI Documents with Multipart/Mixed and Multipart/Form-Data
You can consume and publish OpenAPI documents with multipart/mixed and multipart/form-data in REST Adapter trigger connections. This section describes how to configure this type of scenario in Oracle Integration.
Consume an OpenAPI Document with Endpoints that Consume or Produce HTML Form Data
- Create a REST Adapter connection and select the Trigger and Invoke role.
- In the Connection Properties section, select OpenAPI 1.0/2.0/3.0 URL and specify the connection URL.
- Create an application integration.
- Add a REST Adapter trigger connection.
- On the Resource Configuration page, select a POST action with Configure a request payload for this endpoint and Configure this endpoint to receive the response.
- On the Request page, select Request is multipart with payload and Multipart request is of type multipart/form-data with HTML form payload.
- On the Response page, select Request is multipart with payload and Multipart request is of type multipart/form-data with HTML form payload.
- Add a second REST Adapter as an invoke connection to call the OpenAPI endpoint.
- On the Operation Selection page, select /formdata_html from the Resource list to call the endpoint.
- In the request mapper between the two REST Adapter connections, map the data sent to the trigger connection to the outbound request in the invoke connection. The Parameter List > Parameter > Name element for both the source and target includes the HTML form data.
- In the response mapper after the second REST Adapter connection, perform the same mappings for the response from the outbound call.
- Configure the business identifier to track the integration during runtime.
- Save and activate the integration.
- Invoke the integration and view the results.
Consume an OpenAPI Document with Endpoints with a Multipart/mixed Content Type
- Create a REST Adapter connection and select the Trigger and Invoke role.
- In the Connection Properties section, select OpenAPI 1.0/2.0/3.0 URL and specify the connection URL.
- Create an application integration.
- Add a REST Adapter trigger connection.
- On the Resource Configuration page, select a POST action with Configure a request payload for this endpoint and Configure this endpoint to receive the response.
- On the Request page, select the following:
- Select Request is multipart with payload.
- Select JSON Sample in the dropdown and supply a valid JSON sample object.
- Select multipart/mixed.
- On the Response page, select the following:
- Select Request is multipart with payload.
- Select JSON Sample in the dropdown and supply a valid JSON sample object.
- Select multipart/mixed.
- Add a second REST Adapter as an invoke connection to call the OpenAPI endpoint.
- On the Operation selection page, select /mixed_json from the Resource list to call the endpoint.
- In the request mapper between the two REST Adapter connections, map the data sent to the trigger connection to the outbound request in the invoke connection. Contact Disposition is set to a concrete value of "form-data". It must be form data for multipart mixed to work. The Mixed Json Post Request and Multipart Mixed Data target node represents the payload.
- In the response mapper after the second REST Adapter connection, perform the same mappings for the response from the outbound call.
- Configure the business identifier to track the integration during runtime.
- Save and activate the integration.
- Invoke the integration and view the results.
Consume an OpenAPI Document with Endpoints with multipart/form-data
- Create a REST Adapter connection and select the Trigger and Invoke role.
- In the Connection Properties section, select OpenAPI 1.0/2.0/3.0 URL and specify the connection URL.
- Create an application integration.
- Add a REST Adapter trigger connection.
- On the Resource Configuration page, select a POST action with Configure a request payload for this endpoint and Configure this endpoint to receive the response.
- On the Request page, select the following:
- Select Request is multipart with payload.
- Select JSON Sample in the dropdown and supply a valid JSON sample object.
- Select multipart/form-data.
- On the Response page, select the following:
- Select Request is multipart with payload.
- Select JSON Sample in the dropdown and supply a valid JSON sample object.
- Select multipart/form-data.
- Add a second REST Adapter as an invoke connection to call the OpenAPI endpoint.
- On the Operation selection page, select /formdata_json from the Resource list to call the endpoint.
- In the request mapper between the two REST Adapter connections, map the data sent to the trigger connection to the outbound request in the invoke connection. The Formdata Json Post Request Multipart Form Data Data target node represents the payload.
- In the response mapper after the second REST Adapter connection, perform the same mappings for the response from the outbound call.
- Configure the business identifier to track the integration during runtime.
- Save and activate the integration.
- Invoke the integration and view the results.