feat: generate Swagger API documentation and remove database port exposure from docker-compose
All checks were successful
Build and Release / release (push) Successful in 1m36s

This commit is contained in:
2026-05-14 13:52:11 +07:00
parent 27e9dacf19
commit 94601dbe58
4 changed files with 101 additions and 2 deletions

View File

@@ -11,8 +11,6 @@ services:
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
- PGDATA=/var/lib/postgresql/data
ports:
- "5432:5432"
volumes:
- history_db_data:/var/lib/postgresql/data
healthcheck:

View File

@@ -4045,6 +4045,44 @@ const docTemplate = `{
}
}
},
"/wikis/content/{id}": {
"get": {
"description": "Get detailed information about a specific wiki content version",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Wikis"
],
"summary": "Get wiki content by ID",
"parameters": [
{
"type": "string",
"description": "Wiki Content ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
}
}
}
}
},
"/wikis/slug/exists": {
"get": {
"description": "Check if a given slug already exists for wikis",

View File

@@ -4038,6 +4038,44 @@
}
}
},
"/wikis/content/{id}": {
"get": {
"description": "Get detailed information about a specific wiki content version",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Wikis"
],
"summary": "Get wiki content by ID",
"parameters": [
{
"type": "string",
"description": "Wiki Content ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/history-api_internal_dtos_response.CommonResponse"
}
}
}
}
},
"/wikis/slug/exists": {
"get": {
"description": "Check if a given slug already exists for wikis",

View File

@@ -3316,6 +3316,31 @@ paths:
summary: Get wiki by ID
tags:
- Wikis
/wikis/content/{id}:
get:
consumes:
- application/json
description: Get detailed information about a specific wiki content version
parameters:
- description: Wiki Content ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
summary: Get wiki content by ID
tags:
- Wikis
/wikis/slug/{slug}:
get:
consumes: