Skip to content

Instantly share code, notes, and snippets.

@gaycookie
Last active July 15, 2020 19:42
Show Gist options
  • Save gaycookie/d430cdf1daea353ef9c2e11300515f0d to your computer and use it in GitHub Desktop.
Save gaycookie/d430cdf1daea353ef9c2e11300515f0d to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
{
"swagger" : "2.0",
"info" : {
"description" : "This is a simple API",
"version" : "1.0.0",
"title" : "Random.REST API",
"contact" : {
"name" : "Kawaaii Programming",
"email" : "administrator@kawaaii.moe"
},
"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