swagger API docs
This commit is contained in:
parent
eedfbaf202
commit
c828c706cb
1 changed files with 98 additions and 0 deletions
98
doc/swagger.json
Normal file
98
doc/swagger.json
Normal 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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue