Skip to content

Instantly share code, notes, and snippets.

@Phara0h
Created July 10, 2019 21:23
Show Gist options
  • Save Phara0h/6f4977e309f6531862b5c9fe9e8da2fd to your computer and use it in GitHub Desktop.
Save Phara0h/6f4977e309f6531862b5c9fe9e8da2fd to your computer and use it in GitHub Desktop.
{
"swagger": "2.0",
"info": {
"title": "API-Flow Swagger Conversion",
"version": "0.0.0"
},
"host": "",
"paths": {
"{{HIVE}}/hive/poke": {
"put": {
"summary": "/hive/poke",
"description": "starts the load test.\n\n### Varibles\n#### t\nThe amount of threads \n**Default:**10\n***Optional***\n\n#### c\nThe amount of concurrency\n**Default:**50\n***Optional***\n\n#### d\nHow long to run the test in seconds.\n**Default:**30\n***Optional***\n\n#### timeout\nSocket timeout in seconds\n**Default:**2\n***Optional***\n\n#### target\nThe target url to hit\n\n#### script\nWrk lua script code to execute \n***Optional***",
"operationId": "cb4266f6-33e9-47f9-ad6c-b059c328ca78",
"schemes": [
""
],
"parameters": [
{
"name": "HIVE",
"required": true,
"in": "path",
"$ref": {
"$ref": "#/x-postman/{{HIVE}}"
},
"type": "string"
},
{
"name": "Content-Type",
"required": false,
"in": "header",
"default": "application/json",
"type": "string",
"enum": [
"application/json"
],
"x-title": "Content-Type"
},
{
"name": "body",
"in": "body",
"schema": {
"type": "string",
"default": "{ \n \"t\": \"10\",\n \"c\": \"50\",\n \"d\": \"30\",\n \"target\": \"http://127.0.0.1:1234\" \n}"
}
}
],
"responses": {
"default": {
"description": "stub description for swagger compliance"
}
},
"security": []
}
},
"{{HIVE}}/hive/torch": {
"delete": {
"summary": "/hive/torch/local",
"description": "Deletes all wasps that have checked in and localy spawned. ",
"operationId": "b77e316d-5ff8-4966-9f3a-45edc3dbb0e1",
"schemes": [
""
],
"parameters": [
{
"name": "HIVE",
"required": true,
"in": "path",
"$ref": {
"$ref": "#/x-postman/{{HIVE}}"
},
"type": "string"
},
{
"name": "Content-Type",
"required": false,
"in": "header",
"default": "application/json",
"type": "string",
"enum": [
"application/json"
],
"x-title": "Content-Type"
}
],
"responses": {
"default": {
"description": "stub description for swagger compliance"
}
},
"security": []
}
},
"{{HIVE}}/hive/spawn/local/:amount": {
"get": {
"summary": "/hive/spawn/local/:amount",
"description": "Spawns local wasps by the specified amount.",
"operationId": "573d619a-8a0f-44b9-82cf-c1429dc2655a",
"schemes": [
""
],
"parameters": [
{
"name": "HIVE",
"required": true,
"in": "path",
"$ref": {
"$ref": "#/x-postman/{{HIVE}}"
},
"type": "string"
}
],
"responses": {
"default": {
"description": "stub description for swagger compliance"
}
},
"security": []
}
},
"{{HIVE}}/hive/status": {
"get": {
"summary": "/hive/status",
"description": "Gives the current oprational status of the hive.",
"operationId": "cc2fd418-88d8-4ed0-a137-13b1fbb724c7",
"schemes": [
""
],
"parameters": [
{
"name": "HIVE",
"required": true,
"in": "path",
"$ref": {
"$ref": "#/x-postman/{{HIVE}}"
},
"type": "string"
},
{
"name": "Content-Type",
"required": false,
"in": "header",
"default": "application/json",
"type": "string",
"enum": [
"application/json"
],
"x-title": "Content-Type"
}
],
"responses": {
"default": {
"description": "stub description for swagger compliance"
}
},
"security": []
}
},
"{{HIVE}}/hive/status/report": {
"get": {
"summary": "/hive/status/report",
"description": "Gives full report of the load test.",
"operationId": "65e71c67-9b33-4762-a2ec-4270a442341d",
"schemes": [
""
],
"parameters": [
{
"name": "HIVE",
"required": true,
"in": "path",
"$ref": {
"$ref": "#/x-postman/{{HIVE}}"
},
"type": "string"
},
{
"name": "Content-Type",
"required": false,
"in": "header",
"default": "application/json",
"type": "string",
"enum": [
"application/json"
],
"x-title": "Content-Type"
}
],
"responses": {
"default": {
"description": "stub description for swagger compliance"
}
},
"security": []
}
},
"{{HIVE}}/hive/status/report/:field": {
"get": {
"summary": "/hive/status/report/:field",
"description": "Getting just what you want from the report.",
"operationId": "62f46678-6f98-42c3-b4a5-e3aea7766ef8",
"schemes": [
""
],
"parameters": [
{
"name": "HIVE",
"required": true,
"in": "path",
"$ref": {
"$ref": "#/x-postman/{{HIVE}}"
},
"type": "string"
},
{
"name": "Content-Type",
"required": false,
"in": "header",
"default": "application/json",
"type": "string",
"enum": [
"application/json"
],
"x-title": "Content-Type"
}
],
"responses": {
"default": {
"description": "stub description for swagger compliance"
}
},
"security": []
}
},
"{{HIVE}}/hive/status/done": {
"get": {
"summary": "/hive/status/done",
"description": "Returns 200 when the loadtest is done. ",
"operationId": "311f87fa-93b9-488a-a281-439141dcc3c1",
"schemes": [
""
],
"parameters": [
{
"name": "HIVE",
"required": true,
"in": "path",
"$ref": {
"$ref": "#/x-postman/{{HIVE}}"
},
"type": "string"
},
{
"name": "Content-Type",
"required": false,
"in": "header",
"default": "application/json",
"type": "string",
"enum": [
"application/json"
],
"x-title": "Content-Type"
}
],
"responses": {
"default": {
"description": "stub description for swagger compliance"
}
},
"security": []
}
},
"{{WASP}}/fire": {
"put": {
"summary": "/fire",
"description": "Have the wasp start the loadtest.\n\n### Varibles\n#### t\nThe amount of threads \n**Default:**10\n***Optional***\n\n#### c\nThe amount of concurrency\n**Default:**50\n***Optional***\n\n#### d\nHow long to run the test in seconds.\n**Default:**30\n***Optional***\n\n#### timeout\nSocket timeout in seconds\n**Default:**2\n***Optional***\n\n#### target\nThe target url to hit\n\n#### script\nWrk lua script code to execute \n***Optional***",
"operationId": "5c04637d-8a63-4e79-aa50-189d248eb0b0",
"schemes": [
""
],
"parameters": [
{
"name": "WASP",
"required": true,
"in": "path",
"$ref": {
"$ref": "#/x-postman/{{WASP}}"
},
"type": "string"
},
{
"name": "Content-Type",
"required": false,
"in": "header",
"default": "application/json",
"type": "string",
"enum": [
"application/json"
],
"x-title": "Content-Type"
},
{
"name": "body",
"in": "body",
"schema": {
"type": "string",
"default": "{\n\t\"t\":10,\n\t\"c\":50,\n\t\"d\":5,\n\t\"target\":\"http://127.0.0.1:1234/\"\n}"
}
}
],
"responses": {
"default": {
"description": "stub description for swagger compliance"
}
},
"security": []
}
},
"{{WASP}}/die": {
"delete": {
"summary": "/die",
"description": "Kill the wasp like the fearful god you are.",
"operationId": "68bf65c5-dc5b-4bbc-9ce0-2329ef578cb5",
"schemes": [
""
],
"parameters": [
{
"name": "WASP",
"required": true,
"in": "path",
"$ref": {
"$ref": "#/x-postman/{{WASP}}"
},
"type": "string"
}
],
"responses": {
"default": {
"description": "stub description for swagger compliance"
}
},
"security": []
}
},
"{{WASP}}/boop": {
"get": {
"summary": "/boop",
"description": "Boop the snoot of the wasp to see if its still alive.",
"operationId": "c9693701-4082-4d2e-9693-212b26ac27fc",
"schemes": [
""
],
"parameters": [
{
"name": "WASP",
"required": true,
"in": "path",
"$ref": {
"$ref": "#/x-postman/{{WASP}}"
},
"type": "string"
}
],
"responses": {
"default": {
"description": "stub description for swagger compliance"
}
},
"security": []
}
},
"{{HIVE}}/wasp/reportin/:id": {
"put": {
"summary": "/wasp/reportin/:id",
"description": "Wasps hits this endpoint when the load test is done with its results\n\n**This is used by the wasp and should not be used directly** ",
"operationId": "452f17a0-2263-4879-a29a-298c3f0fb95c",
"schemes": [
""
],
"parameters": [
{
"name": "HIVE",
"required": true,
"in": "path",
"$ref": {
"$ref": "#/x-postman/{{HIVE}}"
},
"type": "string"
},
{
"name": "Content-Type",
"required": false,
"in": "header",
"default": "application/json",
"type": "string",
"enum": [
"application/json"
],
"x-title": "Content-Type"
},
{
"name": "body",
"in": "body",
"schema": {
"type": "string"
}
}
],
"responses": {
"default": {
"description": "stub description for swagger compliance"
}
},
"security": []
}
},
"{{HIVE}}/wasp/reportin/:id/failed": {
"put": {
"summary": "/wasp/reportin/:id/failed",
"description": "Wasps hits this endpoint when the load test it has failed its loadtest\n\n**This is used by the wasp and should not be used directly** ",
"operationId": "c8a1cc5d-2a91-415e-91e0-fc80865af203",
"schemes": [
""
],
"parameters": [
{
"name": "HIVE",
"required": true,
"in": "path",
"$ref": {
"$ref": "#/x-postman/{{HIVE}}"
},
"type": "string"
},
{
"name": "Content-Type",
"required": false,
"in": "header",
"default": "application/json",
"type": "string",
"enum": [
"application/json"
],
"x-title": "Content-Type"
},
{
"name": "body",
"in": "body",
"schema": {
"type": "string"
}
}
],
"responses": {
"default": {
"description": "stub description for swagger compliance"
}
},
"security": []
}
},
"{{HIVE}}/wasp/checkin/:port": {
"get": {
"summary": "/wasp/checkin/:port",
"description": "Wasps hits this endpoint when it first starts up to let hive know its IP and port number.\n\n**This is used by the wasp and should not be used directly** ",
"operationId": "c3d9c742-bc72-4810-a7b4-e0e8a4f9674e",
"schemes": [
""
],
"parameters": [
{
"name": "HIVE",
"required": true,
"in": "path",
"$ref": {
"$ref": "#/x-postman/{{HIVE}}"
},
"type": "string"
},
{
"name": "Content-Type",
"required": false,
"in": "header",
"default": "application/json",
"type": "string",
"enum": [
"application/json"
],
"x-title": "Content-Type"
}
],
"responses": {
"default": {
"description": "stub description for swagger compliance"
}
},
"security": []
}
},
"{{HIVE}}/wasp/heartbeat/:port": {
"get": {
"summary": "/wasp/heartbeat/:port",
"description": "Wasps hit this endpoint every 5 seconds to let Hive know they are not ded boiz.\n\n**This is used by the wasp and should not be used directly** ",
"operationId": "18eca154-b29a-496c-a398-099fe0bb2751",
"schemes": [
""
],
"parameters": [
{
"name": "HIVE",
"required": true,
"in": "path",
"$ref": {
"$ref": "#/x-postman/{{HIVE}}"
},
"type": "string"
},
{
"name": "Content-Type",
"required": false,
"in": "header",
"default": "application/json",
"type": "string",
"enum": [
"application/json"
],
"x-title": "Content-Type"
}
],
"responses": {
"default": {
"description": "stub description for swagger compliance"
}
},
"security": []
}
},
"{{HIVE}}/wasp/boop/snoots": {
"get": {
"summary": "/wasp/boop/snoots",
"description": "Force a health check on all the wasps to see if there alive.",
"operationId": "7e40da07-17c6-44b7-b763-1cad70c8b2e4",
"schemes": [
""
],
"parameters": [
{
"name": "HIVE",
"required": true,
"in": "path",
"$ref": {
"$ref": "#/x-postman/{{HIVE}}"
},
"type": "string"
}
],
"responses": {
"default": {
"description": "stub description for swagger compliance"
}
},
"security": []
}
},
"{{HIVE}}/wasp/list": {
"get": {
"summary": "/wasp/list",
"description": "Lists all current wasps that have checked in.",
"operationId": "1f13ebbc-5925-462b-8ddd-7739cf77759c",
"schemes": [
""
],
"parameters": [
{
"name": "HIVE",
"required": true,
"in": "path",
"$ref": {
"$ref": "#/x-postman/{{HIVE}}"
},
"type": "string"
},
{
"name": "Content-Type",
"required": false,
"in": "header",
"default": "application/json",
"type": "string",
"enum": [
"application/json"
],
"x-title": "Content-Type"
}
],
"responses": {
"default": {
"description": "stub description for swagger compliance"
}
},
"security": []
}
}
},
"x-postman": {
"{{HIVE}}/hive/torch": {
"type": "string",
"default": "null~1hive~1torch"
},
"{{HIVE}}": {
"type": "string"
},
"{{HIVE}}/wasp/heartbeat/:port": {
"type": "string",
"default": "null~1wasp~1heartbeat~1:port"
},
"{{HIVE}}/wasp/list": {
"type": "string",
"default": "null~1wasp~1list"
},
"{{HIVE}}/hive/status/done": {
"type": "string",
"default": "null~1hive~1status~1done"
},
"{{HIVE}}/wasp/reportin/:id": {
"type": "string",
"default": "null~1wasp~1reportin~1:id"
},
"{{HIVE}}/hive/spawn/local/:amount": {
"type": "string",
"default": "null~1hive~1spawn~1local~1:amount"
},
"{{WASP}}/fire": {
"type": "string",
"default": "null~1fire"
},
"{{WASP}}": {
"type": "string"
},
"{{HIVE}}/hive/status/report/:field": {
"type": "string",
"default": "null~1hive~1status~1report~1:field"
},
"{{HIVE}}/hive/status/report": {
"type": "string",
"default": "null~1hive~1status~1report"
},
"{{WASP}}/die": {
"type": "string",
"default": "null~1die"
},
"{{HIVE}}/wasp/boop/snoots": {
"type": "string",
"default": "null~1wasp~1boop~1snoots"
},
"{{HIVE}}/wasp/checkin/:port": {
"type": "string",
"default": "null~1wasp~1checkin~1:port"
},
"{{HIVE}}/wasp/reportin/:id/failed": {
"type": "string",
"default": "null~1wasp~1reportin~1:id~1failed"
},
"{{WASP}}/boop": {
"type": "string",
"default": "null~1boop"
},
"{{HIVE}}/hive/poke": {
"type": "string",
"default": "null~1hive~1poke"
},
"{{HIVE}}/hive/status": {
"type": "string",
"default": "null~1hive~1status"
}
},
"schemes": [],
"securityDefinitions": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment