Files
SafeLine/backend/docs/swagger.json
2023-11-21 15:57:56 +08:00

176 lines
5.0 KiB
JSON

{
"swagger": "2.0",
"info": {
"contact": {}
},
"paths": {
"/repos/discussions": {
"get": {
"description": "get discussions from GitHub",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"GitHub"
],
"summary": "get discussions",
"parameters": [
{
"type": "string",
"description": "search by",
"name": "q",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/service.Discussion"
}
}
}
}
}
},
"/repos/issues": {
"get": {
"description": "get issues from GitHub",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"GitHub"
],
"summary": "get issues",
"parameters": [
{
"type": "string",
"description": "search by",
"name": "q",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/service.Issue"
}
}
}
}
}
}
},
"definitions": {
"service.Discussion": {
"type": "object",
"properties": {
"author": {
"$ref": "#/definitions/service.User"
},
"category_name": {
"type": "string"
},
"comment_count": {
"type": "integer"
},
"comment_users": {
"type": "array",
"items": {
"$ref": "#/definitions/service.User"
}
},
"created_at": {
"type": "integer"
},
"id": {
"type": "string"
},
"is_answered": {
"type": "boolean"
},
"labels": {
"type": "array",
"items": {
"$ref": "#/definitions/service.Label"
}
},
"thumbs_up": {
"type": "integer"
},
"title": {
"type": "string"
},
"upvote_count": {
"type": "integer"
}
}
},
"service.Issue": {
"type": "object",
"properties": {
"author": {
"$ref": "#/definitions/service.User"
},
"comment_count": {
"type": "integer"
},
"created_at": {
"type": "integer"
},
"id": {
"type": "string"
},
"labels": {
"type": "array",
"items": {
"$ref": "#/definitions/service.Label"
}
},
"thumbs_up": {
"type": "integer"
},
"title": {
"type": "string"
},
"url": {
"type": "string"
}
}
},
"service.Label": {
"type": "object",
"properties": {
"color": {
"type": "string"
},
"name": {
"type": "string"
}
}
},
"service.User": {
"type": "object",
"properties": {
"avatar_url": {
"type": "string"
},
"login": {
"type": "string"
}
}
}
}
}