swagger API docs

This commit is contained in:
Brad Rydzewski 2015-05-17 15:22:54 -07:00
parent eedfbaf202
commit c828c706cb

98
doc/swagger.json Normal file
View file

@ -0,0 +1,98 @@
{
"swagger": "2.0",
"info": {
"version": "1.0.0",
"title": "Drone API",
"contact": {
"name": "Team Drone",
"url": "https://github.com/drone/drone"
},
"license": {
"name": "Creative Commons 4.0 International",
"url": "http://creativecommons.org/licenses/by/4.0/"
}
},
"host": "localhost:8080",
"basePath": "/api",
"schemes": [
"http"
],
"paths": {
"/user": {
"get": {
"description": "Returns the currently authenticated user.",
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "The currently authenticated user.",
"schema": {
"$ref": "#/definitions/User"
}
}
}
},
"patch": {
"description": "Updates the currently authenticated user.",
"produces": [
"application/json"
],
"parameters": [
{
"name": "pet",
"in": "body",
"description": "Updates to the user.",
"required": true,
"schema": {
"$ref": "#/definitions/User"
}
}
],
"responses": {
"200": {
"description": "The updated user.",
"schema": {
"$ref": "#/definitions/User"
}
}
}
}
}
},
"definitions": {
"User": {
"required": [
"login"
],
"properties": {
"login": {
"type": "string"
},
"name": {
"type": "string"
},
"email": {
"type": "string"
},
"gravatar_id": {
"type": "string"
},
"admin": {
"type": "boolean"
},
"active": {
"type": "boolean"
},
"created_at": {
"type": "integer",
"format": "int64"
},
"updated_at": {
"type": "integer",
"format": "int64"
}
}
}
}
}