mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2026-04-15 01:41:56 +00:00
99 lines
1.7 KiB
JSON
99 lines
1.7 KiB
JSON
{
|
|
"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"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|