Skip to content

Latest commit

 

History

History
59 lines (58 loc) · 1.54 KB

delete-movie.md

File metadata and controls

59 lines (58 loc) · 1.54 KB

Below is the annotated version of the spec with the changes made. View the complete spec. See the full list of options that Toolbeam uses here.

{
  "swagger": "2.0",
  "info": {
    "title": "Classic Movies",
    "version": "1.0.0"
  },
  "host": "toolbeam-example-api-gqzlijbklg.now.sh",
  "schemes": [
    "https"
  ],
  "paths": {
    "/movies/{id}": {
      "get": {
        ... // This is unchanged from before
      },
      "put": {
        ... // This is unchanged from before
      },
      "delete": {
        "x-tb-name": "Delete Movie", // Give our tool a name
        "operationId": "vskhioho",
        "security": [
          {
            "basic_auth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "type": "string",
            "x-tb-fieldLabel": "Movie Id", // Change the field label
            "x-tb-fieldPlaceholder": "Ex: 4", // Add a placeholder text
            "x-tb-fieldType": "number"
          }
        ],
        "responses": {
          "200": {
            "description": "Movie Deleted" // Add some response text
          }
        },
        "x-tb-actionLabel": "Delete", // Change the button text
        "x-tb-color": "red", // Change the button color
        "x-tb-needsConfirm": true, // Confirm before deleting
        "x-tb-needsNotificationPermission": false
      }
    }
  },
  "securityDefinitions": {
    "basic_auth": {
      "type": "basic"
    }
  }
}