1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00

fix: single heartbeat endpoint (resolve #212)

docs: swagger docs for all available heartbeat endpoints
This commit is contained in:
Ferdinand Mütsch
2021-06-21 21:53:47 +02:00
parent 466f2e1786
commit 9f1266957b
5 changed files with 580 additions and 15 deletions

View File

@ -160,6 +160,75 @@ var doc = `{
}
}
},
"/compat/wakatime/v1/users/{user}/heartbeats": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"consumes": [
"application/json"
],
"tags": [
"heartbeat"
],
"summary": "Push a new heartbeat",
"operationId": "post-heartbeat-3",
"parameters": [
{
"description": "A single heartbeat",
"name": "heartbeat",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/models.Heartbeat"
}
}
],
"responses": {
"201": {
"description": ""
}
}
}
},
"/compat/wakatime/v1/users/{user}/heartbeats.bulk": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"consumes": [
"application/json"
],
"tags": [
"heartbeat"
],
"summary": "Push new heartbeats",
"operationId": "post-heartbeat-6",
"parameters": [
{
"description": "Multiple heartbeats",
"name": "heartbeat",
"in": "body",
"required": true,
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/models.Heartbeat"
}
}
}
],
"responses": {
"201": {
"description": ""
}
}
}
},
"/compat/wakatime/v1/users/{user}/projects": {
"get": {
"security": [
@ -361,7 +430,7 @@ var doc = `{
"operationId": "post-heartbeat",
"parameters": [
{
"description": "A heartbeat",
"description": "A single heartbeat",
"name": "heartbeat",
"in": "body",
"required": true,
@ -377,6 +446,42 @@ var doc = `{
}
}
},
"/heartbeats": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"consumes": [
"application/json"
],
"tags": [
"heartbeat"
],
"summary": "Push new heartbeats",
"operationId": "post-heartbeat-4",
"parameters": [
{
"description": "Multiple heartbeats",
"name": "heartbeat",
"in": "body",
"required": true,
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/models.Heartbeat"
}
}
}
],
"responses": {
"201": {
"description": ""
}
}
}
},
"/summary": {
"get": {
"security": [
@ -441,6 +546,75 @@ var doc = `{
}
}
}
},
"/v1/users/{user}/heartbeats": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"consumes": [
"application/json"
],
"tags": [
"heartbeat"
],
"summary": "Push a new heartbeat",
"operationId": "post-heartbeat-2",
"parameters": [
{
"description": "A single heartbeat",
"name": "heartbeat",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/models.Heartbeat"
}
}
],
"responses": {
"201": {
"description": ""
}
}
}
},
"/v1/users/{user}/heartbeats.bulk": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"consumes": [
"application/json"
],
"tags": [
"heartbeat"
],
"summary": "Push new heartbeats",
"operationId": "post-heartbeat-5",
"parameters": [
{
"description": "Multiple heartbeats",
"name": "heartbeat",
"in": "body",
"required": true,
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/models.Heartbeat"
}
}
}
],
"responses": {
"201": {
"description": ""
}
}
}
}
},
"definitions": {
@ -506,6 +680,12 @@ var doc = `{
"format": "date",
"example": "2006-01-02 15:04:05.000"
},
"labels": {
"type": "array",
"items": {
"$ref": "#/definitions/models.SummaryItem"
}
},
"languages": {
"type": "array",
"items": {