Service Metadata and Response Schemas for Custom Actions

If a given REST API supports custom actions, they are described in the OpenAPI service metadata generated by the REST service. For example, a reject item-level custom action would appear in the paths collection:

// Note: some JSON content has been omitted for brevity/clarity
"/ExpenseReports/{ExpenseReports_Id}/action/reject": {
  "parameters": [
    {
      "$ref": "#/components/parameters/ExpenseReports_Id"
    }
  ],
  "post": {
    "summary": "reject",
    "description": "reject",
    "operationId": "do_reject_ExpenseReports",
    "responses": {
      "default": {
        "description": "The following table describes the default response for this task.",
        "content": {
          "application/vnd.oracle.adf.actionresult+json": {
            "schema": {
              "type": "object",
              "properties": {
                "result": {
                  "type": "string"
                }
              },
              "required": [
                "result"
              ],
              "additionalProperties": false
            }
          }
        }
      }
    },
    "requestBody": {
      "description": "The following table describes the body parameters in the request for this task.",
      "content": {
        "application/vnd.oracle.adf.action+json": {
          "schema": {
            "type": "object",
            "properties": {
              "rejectionReasonCode": {
                "type": "string",
                "nullable": true
              },
              "notes": {
                "type": "string",
                "nullable": true
              }
            },
            "additionalProperties": false
          }
        }
      }
    }
  }
}

Note the following: