feat: update docs, fix repository, full working github callback, fix healthcheck in docker file, update makefile
This commit is contained in:
@@ -15,22 +15,58 @@ const docTemplate = `{
|
||||
"host": "{{.Host}}",
|
||||
"basePath": "{{.BasePath}}",
|
||||
"paths": {
|
||||
"/auth/github": {
|
||||
"get": {
|
||||
"description": "Redirects to GitHub authorization",
|
||||
"tags": [
|
||||
"auth"
|
||||
],
|
||||
"summary": "Start GitHub OAuth login",
|
||||
"responses": {
|
||||
"302": {
|
||||
"description": "Found"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/callback/github": {
|
||||
"get": {
|
||||
"description": "Callback for oauth2 providers",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"description": "Exchanges authorization code for access token",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"auth"
|
||||
],
|
||||
"summary": "Callback for oauth2 providers",
|
||||
"summary": "GitHub OAuth callback",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Authorization code",
|
||||
"name": "code",
|
||||
"in": "query",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"description": "Access token",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": true
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Missing code",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Exchange failed",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
@@ -227,7 +263,7 @@ const docTemplate = `{
|
||||
"content": {
|
||||
"type": "string"
|
||||
},
|
||||
"createdAt": {
|
||||
"created_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
|
||||
@@ -4,22 +4,58 @@
|
||||
"contact": {}
|
||||
},
|
||||
"paths": {
|
||||
"/auth/github": {
|
||||
"get": {
|
||||
"description": "Redirects to GitHub authorization",
|
||||
"tags": [
|
||||
"auth"
|
||||
],
|
||||
"summary": "Start GitHub OAuth login",
|
||||
"responses": {
|
||||
"302": {
|
||||
"description": "Found"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/callback/github": {
|
||||
"get": {
|
||||
"description": "Callback for oauth2 providers",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"description": "Exchanges authorization code for access token",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"auth"
|
||||
],
|
||||
"summary": "Callback for oauth2 providers",
|
||||
"summary": "GitHub OAuth callback",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Authorization code",
|
||||
"name": "code",
|
||||
"in": "query",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"description": "Access token",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": true
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Missing code",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Exchange failed",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
@@ -216,7 +252,7 @@
|
||||
"content": {
|
||||
"type": "string"
|
||||
},
|
||||
"createdAt": {
|
||||
"created_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
|
||||
@@ -6,7 +6,7 @@ definitions:
|
||||
properties:
|
||||
content:
|
||||
type: string
|
||||
createdAt:
|
||||
created_at:
|
||||
type: string
|
||||
id:
|
||||
type: integer
|
||||
@@ -32,21 +32,45 @@ definitions:
|
||||
info:
|
||||
contact: {}
|
||||
paths:
|
||||
/auth/github:
|
||||
get:
|
||||
description: Redirects to GitHub authorization
|
||||
responses:
|
||||
"302":
|
||||
description: Found
|
||||
summary: Start GitHub OAuth login
|
||||
tags:
|
||||
- auth
|
||||
/callback/github:
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Callback for oauth2 providers
|
||||
description: Exchanges authorization code for access token
|
||||
parameters:
|
||||
- description: Authorization code
|
||||
in: query
|
||||
name: code
|
||||
required: true
|
||||
type: string
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
description: Access token
|
||||
schema:
|
||||
additionalProperties: true
|
||||
type: object
|
||||
"400":
|
||||
description: Missing code
|
||||
schema:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
summary: Callback for oauth2 providers
|
||||
"500":
|
||||
description: Exchange failed
|
||||
schema:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
summary: GitHub OAuth callback
|
||||
tags:
|
||||
- auth
|
||||
/posts:
|
||||
|
||||
Reference in New Issue
Block a user