Last active
July 15, 2020 19:42
-
-
Save gaycookie/d430cdf1daea353ef9c2e11300515f0d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"swagger" : "2.0", | |
"info" : { | |
"description" : "This is a simple API", | |
"version" : "1.0.0", | |
"title" : "Random.REST API", | |
"contact" : { | |
"name" : "Kawaaii Programming", | |
"email" : "[email protected]" | |
}, | |
"license" : { | |
"name" : "Apache 2.0", | |
"url" : "http://www.apache.org/licenses/LICENSE-2.0.html" | |
}, | |
"x-logo" : { | |
"url" : "https://gist.githubusercontent.com/kawaaii/d430cdf1daea353ef9c2e11300515f0d/raw/7c414628a30e115516f1c0063e63c27e33b46c02/logo.svg" | |
} | |
}, | |
"host" : "random.rest", | |
"basePath" : "/api", | |
"tags" : [ { | |
"name" : "General", | |
"description" : "General API endpoints." | |
}, { | |
"name" : "Images", | |
"description" : "Image API endpoints." | |
} ], | |
"schemes" : [ "https" ], | |
"paths" : { | |
"/endpoints" : { | |
"get" : { | |
"tags" : [ "General" ], | |
"summary" : "/endpoints", | |
"produces" : [ "application/json" ], | |
"parameters" : [ ], | |
"responses" : { | |
"200" : { | |
"description" : "", | |
"schema" : { | |
"$ref" : "#/definitions/inline_response_200" | |
} | |
}, | |
"429" : { | |
"description" : "Too many requests" | |
} | |
} | |
} | |
}, | |
"/images/random" : { | |
"get" : { | |
"tags" : [ "Images" ], | |
"summary" : "/images/random", | |
"produces" : [ "application/json" ], | |
"parameters" : [ ], | |
"responses" : { | |
"200" : { | |
"description" : "Success" | |
}, | |
"429" : { | |
"description" : "Too many requests" | |
} | |
} | |
} | |
}, | |
"/images/anime" : { | |
"get" : { | |
"tags" : [ "Images" ], | |
"summary" : "/images/anime", | |
"produces" : [ "application/json" ], | |
"parameters" : [ ], | |
"responses" : { | |
"200" : { | |
"description" : "Success" | |
}, | |
"429" : { | |
"description" : "Too many requests" | |
} | |
} | |
} | |
}, | |
"/images/memes" : { | |
"get" : { | |
"tags" : [ "Images" ], | |
"summary" : "/images/memes", | |
"produces" : [ "application/json" ], | |
"parameters" : [ ], | |
"responses" : { | |
"200" : { | |
"description" : "Success" | |
}, | |
"429" : { | |
"description" : "Too many requests" | |
} | |
} | |
} | |
} | |
}, | |
"definitions" : { | |
"InventoryItem" : { | |
"type" : "object", | |
"required" : [ "id", "manufacturer", "name", "releaseDate" ], | |
"properties" : { | |
"id" : { | |
"type" : "string", | |
"format" : "uuid", | |
"example" : "d290f1ee-6c54-4b01-90e6-d701748f0851" | |
}, | |
"name" : { | |
"type" : "string", | |
"example" : "Widget Adapter" | |
}, | |
"releaseDate" : { | |
"type" : "string", | |
"format" : "date-time", | |
"example" : "2016-08-29T09:12:33.001Z" | |
}, | |
"manufacturer" : { | |
"$ref" : "#/definitions/Manufacturer" | |
} | |
} | |
}, | |
"Manufacturer" : { | |
"required" : [ "name" ], | |
"properties" : { | |
"name" : { | |
"type" : "string", | |
"example" : "ACME Corporation" | |
}, | |
"homePage" : { | |
"type" : "string", | |
"format" : "url", | |
"example" : "https://www.acme-corp.com" | |
}, | |
"phone" : { | |
"type" : "string", | |
"example" : "408-867-5309" | |
} | |
} | |
}, | |
"inline_response_200" : { | |
"type" : "object", | |
"properties" : { | |
"/" : { | |
"type" : "array", | |
"example" : [ "/endpoints", "/check" ], | |
"items" : { | |
"type" : "string" | |
} | |
}, | |
"/users" : { | |
"type" : "array", | |
"example" : [ "/@me" ], | |
"items" : { | |
"type" : "string" | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment