|
| 1 | +{ |
| 2 | + "StartStage": "ApiSourceSwitch", |
| 3 | + "Stages": [ |
| 4 | + { |
| 5 | + "Name": "ApiSourceSwitch", |
| 6 | + "Prompt": "What is the source for the new Api?", |
| 7 | + "Retrieval": { |
| 8 | + "Type": "Static", |
| 9 | + "Resource": [ |
| 10 | + { "Option": "Create new Api", "Stage": "CreateApi"}, |
| 11 | + { "Option": "Generate new Api from swagger spec file", "Stage": "NewSwaggerApi"} |
| 12 | + ] |
| 13 | + }, |
| 14 | + "Interaction": { "ScreenType": "SimpleSelect", "Path": "[].Option" }, |
| 15 | + "Resolution": { |
| 16 | + "Path": "Stage", |
| 17 | + "Key": "CreationType" |
| 18 | + }, |
| 19 | + "NextStage": { "Type": "Variable", "Name": "CreationType" } |
| 20 | + }, |
| 21 | + { |
| 22 | + "Name": "NewSwaggerApi", |
| 23 | + "Prompt": "Enter the path to the JSON swagger spec file", |
| 24 | + "Interaction": { "ScreenType": "FilePrompt" }, |
| 25 | + "Resolution": { "Key": "SwaggerBlob" }, |
| 26 | + "NextStage": { "Type": "Name", "Name": "ImportApiRequest" } |
| 27 | + }, |
| 28 | + { |
| 29 | + "Name": "ImportApiRequest", |
| 30 | + "Prompt": "Importing Api from swagger spec...", |
| 31 | + |
| 32 | + "Retrieval": { |
| 33 | + "Type": "Request", |
| 34 | + "Resource": { |
| 35 | + "Service": "apigateway", |
| 36 | + "Operation": "ImportRestApi", |
| 37 | + "Parameters": { "failOnWarnings": true }, |
| 38 | + "EnvParameters": { "body": "SwaggerBlob" } |
| 39 | + } |
| 40 | + } |
| 41 | + }, |
| 42 | + { |
| 43 | + "Name": "CreateApi", |
| 44 | + "Prompt": "Api Name and Description", |
| 45 | + "Retrieval": { |
| 46 | + "Type": "Static", |
| 47 | + "Resource": { "name": "", "description": "" } |
| 48 | + }, |
| 49 | + "Interaction": { "ScreenType": "SimplePrompt" }, |
| 50 | + "Resolution": { "Key": "Details" }, |
| 51 | + "NextStage": { "Type": "Name", "Name": "CloneSwitch" } |
| 52 | + }, |
| 53 | + { |
| 54 | + "Name": "CloneSwitch", |
| 55 | + "Prompt": "Create new empty Api or clone from existing?", |
| 56 | + "Retrieval": { |
| 57 | + "Type": "Static", |
| 58 | + "Resource": [ |
| 59 | + { "Option": "Create new Api", "Stage": "CreateApiRequest" }, |
| 60 | + { "Option": "Clone existing Api", "Stage": "GetApiList" } |
| 61 | + ] |
| 62 | + }, |
| 63 | + "Interaction": { "ScreenType": "SimpleSelect", "Path": "[].Option" }, |
| 64 | + "Resolution": { "Path": "Stage", "Key": "CloneType" }, |
| 65 | + "NextStage": { "Type": "Variable", "Name": "CloneType" } |
| 66 | + }, |
| 67 | + { |
| 68 | + "Name": "GetApiList", |
| 69 | + "Prompt": "Select an Api to clone", |
| 70 | + |
| 71 | + "Retrieval": { |
| 72 | + "Type": "Request", |
| 73 | + "Resource": { |
| 74 | + "Service": "apigateway", |
| 75 | + "Operation": "GetRestApis" |
| 76 | + }, |
| 77 | + "Path": "items" |
| 78 | + }, |
| 79 | + "Interaction": { "ScreenType": "InfoSelect", "Path": "[].name" }, |
| 80 | + "Resolution": { "Path": "id", "Key": "ApiId" }, |
| 81 | + "NextStage": { "Type": "Name", "Name": "CreateApiRequest" } |
| 82 | + }, |
| 83 | + { |
| 84 | + "Name": "CreateApiRequest", |
| 85 | + "Prompt": "Creating new Api...", |
| 86 | + |
| 87 | + "Retrieval": { |
| 88 | + "Type": "Request", |
| 89 | + "Resource": { |
| 90 | + "Service": "apigateway", |
| 91 | + "Operation": "CreateRestApi", |
| 92 | + "EnvParameters": { |
| 93 | + "cloneFrom": "ApiId", |
| 94 | + "name": "Details.name", |
| 95 | + "description": "Details.description" |
| 96 | + } |
| 97 | + } |
| 98 | + } |
| 99 | + } |
| 100 | + ] |
| 101 | +} |
0 commit comments