Skip to content

Instantly share code, notes, and snippets.

@rmtuckerphx
Created July 29, 2020 05:26
Show Gist options
  • Save rmtuckerphx/531cadb7da1dc97a062f6205dc8a6f0f to your computer and use it in GitHub Desktop.
Save rmtuckerphx/531cadb7da1dc97a062f6205dc8a6f0f to your computer and use it in GitHub Desktop.
{
"openapi": "3.0.0",
"info": {
"title": "Task to get launch stats",
"version": "1",
"x-amzn-alexa-access-scope": "public"
},
"tags": [
{
"name": "launch stats"
}
],
"paths": {
"/LaunchStats": {
"summary": "Launch Stats",
"description": "To gather launch statistics",
"post": {
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Input"
},
"examples": {
"campaign1twitter": {
"summary": "Campaign 1 - Twitter.",
"description": "Campaign 1 from Twitter",
"value": {
"a2z_ref": "c1_twitter"
}
},
"campaign2facebook": {
"summary": "Campaign 2 - Facebook.",
"description": "Campaign 2 from Facebook",
"value": {
"a2z_ref": "c2_fb"
}
}
}
}
}
},
"responses": {
"200": {
"description": "When the stat is successful",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SuccessfulResponse"
}
}
}
},
"400": {
"description": "When the given parameter is missing"
},
"500": {
"description": "When the stat fails"
}
}
}
}
},
"components": {
"schemas": {
"Input": {
"type": "object",
"properties": {
"a2z_ref": {
"type": "string"
}
}
},
"SuccessfulResponse": {
"type": "object",
"properties": {
"endTime": {
"type": "string",
"format": "date-time"
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment