Skip to content

Open API Activities #2961

@sfmskywalker

Description

@sfmskywalker

Description

There should be an activity type provider that yields activities based on a given Open API specification.
This way, the user would not have to manually configure Send HTTP Request activities manually.
Instead, for each Path object in the Open API spec, an activity would be available.

Example

For example, take the following Open API specification:

{
  "/pets": {
    "get": {
      "summary": "Find pets by ID",
      "description": "Returns all pets from the system that the user has access to",
      "responses": {
        "200": {
          "description": "A list of pets.",
          "content": {}
        }
      }
    }
  },
  "parameters": [
    {
      "name": "id",
      "in": "path",
      "description": "ID of pet to use",
      "required": true,
      "schema": {
        "type": "array",
        "items": {
          "type": "string"
        }
      },
      "style": "simple"
    }
  ],
  "post": {
    "summary": "Create a new pet",
    "description": "Create a new pet",
    "responses": {
      "201": {
        "description": "The created pet.",
        "content": {}
      }
    }
  },
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "name": {
              "description": "Name of the pet",
              "type": "string"
            },
            "status": {
              "description": "Status of the pet",
              "type": "string"
            }
          },
          "required": [
            "name",
            "status"
          ]
        }
      }
    }
  }
}

The proposed activity type provider would yield the following two activities:

  • Find pets by ID
  • Create a new pet

Each activity would also provide the expected input properties, such as "ID" for "Find pets by ID" and "Name of the pet" for "Create a new pet".

The available outcomes would be determined by the supported HTTP response status codes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    activityThis issue relates to a workflows activitycoreThis issue relates to the core library

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions