Adding responses to the OpenAPI descriptor

Use the context menu to add response objects to the OpenAPI descriptor.

Procedure

  1. Right-click in the OpenAPI Editor and click New > Response Object.
  2. In the tree, select the level where you want to create the response.
    The wizard shows a tree for all existing paths, methods, and operationIDs within the OpenAPI descriptor that you edit. The Path column contains the following values:
    • The root or basepath. This path is the only path that never has children and it is the first entry in the tree.
    • Additional path entries within the OpenAPI descriptor are listed after the root or basepath entry.
    You can create the response globally for the whole OpenAPI descriptor or for a specified operation.
    • To create the response globally, select the basePath in the table. If no basePath is defined in the OpenAPI descriptor, select root.
    • To create the response for a specified operation, expand the path to where the operation is defined and select the operation.
  3. Specify a name for the response. The name must be a valid HTTP code or the value default.
  4. Specify a description for the response.
    Descriptions are required for responses.
  5. Optional: If any definitions exist in the swagger, a list with all existing definitions is available for you to add a schema with a reference to a definition.