The Responses
configuration panel opens. Responses are evaluated from top to bottom where the final response is
the default response. Each response has the following properties:
A condition with three fields, response, predicate, and value.
One or more conditions.
You can change the order of the responses by using the and buttons beside each response case.
The sequence of the conditions within a response can be changed. Click to change the position in the
sequence.
Conditions can be deleted. Click to delete a
condition.
Figure 2. Responses available.
The default order of the responses is such that 200 - OK is the first to
be evaluated and 500 - Internal server error is the last and therefore the default
response.
Note: Best practice is to configure 500 - Internal server error as the default
response to capture any errors in the conditional logic of the response.
Set conditions for the 200 - OK response.
In this example,
the 200 - OK indicates success.
Select All the following are
true and set the following conditions:
Figure 4. Setting the condition for the 400 response.
The 500 - Internal server error response is the default, so it has no
conditions and must be the last entry in the table.
Figure 5. Default 500 response.
Results
You have successfully defined the conditions in which the OpenAPI's responses (200, 400 and 500) are sent depending on what is returned by the z/OS Asset.