swagdoc
Version:
Documentation Generator
18 lines (15 loc) • 3.86 kB
HTML
<html>
<head>
<title>API Documentation</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="static/css/style.css" >
</head>
<body>
<div id="react-app"></div>
<script>
window.swagDocData = {"name":"Example API Documentation","description":"This is an example of the documentation you can create with Swag Doctor.","paths":{"/users":{"actions":[{"name":"Create user","method":"POST","description":"Allows someone to create a user.","params":{"body":{"user":{"example":{"name":{"description":"The name","example":"Jane Doe","optional":true},"email":{"description":"Email address","type":"Email (String)","example":"Braulio.Willms27@gmail.com"},"username":{"description":"username","example":"janedoe"},"password":{"description":"password","example":"testtest"},"books":{"description":"All books","example":[{"id":{"description":"The id","example":"ae3432aeb35563245","type":"MongoID"},"name":{"description":"The name","example":"Quo est eos et et tenetur."}},{"id":{"description":"The id","example":"ae3432aeb35563245","type":"MongoID"},"name":{"description":"The name","example":"In quia nostrum esse dolor."}},{"id":{"description":"The id","example":"ae3432aeb35563245","type":"MongoID"},"name":{"description":"The name","example":"Suscipit aliquid pariatur cum et et soluta odit quos."}}]}}}}},"responses":[{"name":"Success","status":200,"body":{"user":{"description":"The user","example":{"id":{"description":"The id","example":"ae3432aeb35563245"},"name":{"description":"The name","example":"Jane Doe","optional":false},"age":{"description":"The age","example":24},"email":{"description":"Email address","type":"Email (String)","example":"Velda27@gmail.com"},"username":{"description":"username","example":"janedoe"},"books":{"description":"All books","example":[{"id":{"description":"The id","example":"ae3432aeb35563245","type":"MongoID"},"name":{"description":"The name","example":"Eos quisquam qui."}},{"id":{"description":"The id","example":"ae3432aeb35563245","type":"MongoID"},"name":{"description":"The name","example":"Itaque deserunt libero."}},{"id":{"description":"The id","example":"ae3432aeb35563245","type":"MongoID"},"name":{"description":"The name","example":"Numquam fugit ipsum vitae cupiditate."}}]}}}}},{"name":"Unauthorized Error","status":401,"body":{"errors":{"example":{"unauthorized":"You are not authorized"}}}},{"name":"Permissions Error","status":403,"body":{"errors":{"example":{"unauthorized":"You do not have permissions to perform this action."}}}},{"name":"Not found","status":404,"body":"Not found"}]}],"description":"\n <h4>Stuff</h4>\n <p>\n Groovy\n </p>\n "},"/users/:id":{"actions":[{"name":"Get user","method":"GET","params":{"url":{"id":{"description":"The id","example":"ae3432aeb35563245"}},"query":{"misc":{"description":"Just an example query parameter"},"misc2":{"description":"Another example query parameter"}}},"responses":[],"headers":[{"key":"Authorization","description":"This token is used to authenticate a user with a request. If it is not attached, there will be no user attached to the request. Note that the token must be prepended with \"Bearer: \"","example":"Bearer: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI"}],"description":"\n <p>\n When you get a user, XYZ.\n </p>\n "},{"name":"Update user","method":"PUT","params":{"url":{"id":{"description":"The id","example":"ae3432aeb35563245"}},"body":{"name":{"description":"The name","example":"Jane Doe","optional":false},"email":{"description":"Email address","type":"Email (String)","example":"Kaden.Hodkiewicz@hotmail.com"},"username":{"description":"username","example":"janedoe"}}},"responses":[]}]}}};
</script>
<script src="static/js/react-bundle.js"></script>
</body>
</html>