Template
1
0
Fork 0
goth.stack/docs/swagger.json

198 lines
6.2 KiB
JSON
Raw Normal View History

2024-10-20 16:16:50 -06:00
{
"swagger": "2.0",
"info": {
2024-11-03 17:01:48 -06:00
"description": "This is the API for GOTH Stack - Go + HTMX + Tailwind",
"title": "GOTH Stack API",
2024-10-20 16:16:50 -06:00
"contact": {},
"version": "1.0"
},
"host": "localhost:3000",
"basePath": "/api",
"paths": {
"/ping": {
"get": {
"description": "Get a pong response",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"ping"
],
"summary": "Ping the server",
"responses": {
"200": {
"description": "Pong!",
"schema": {
"type": "string"
}
}
}
}
},
"/post/copy": {
"get": {
"description": "Returns an SVG of a copy icon",
"consumes": [
"application/json"
],
"produces": [
"text/html"
],
"tags": [
"post"
],
"summary": "Get copy icon SVG",
"responses": {
"200": {
"description": "SVG content",
"schema": {
"type": "string"
}
}
}
}
},
"/sse": {
"get": {
"description": "Establishes a Server-Sent Events connection",
"consumes": [
"application/json"
],
"produces": [
"text/event-stream"
],
"tags": [
"sse"
],
"summary": "Server-Sent Events endpoint",
"parameters": [
{
"type": "string",
"description": "Channel name",
"name": "channel",
"in": "query"
}
],
"responses": {
"200": {
"description": "Event stream",
"schema": {
"type": "string"
}
}
}
}
},
"/tools/resize": {
"post": {
"description": "Resizes an uploaded image to specified dimensions",
"consumes": [
"multipart/form-data"
],
"produces": [
"image/png"
],
"tags": [
"tools"
],
"summary": "Resize an image",
"parameters": [
{
"type": "file",
"description": "Image file to resize",
"name": "image",
"in": "formData",
"required": true
},
{
"type": "integer",
"description": "Target width",
"name": "width",
"in": "formData",
"required": true
},
{
"type": "integer",
"description": "Target height",
"name": "height",
"in": "formData",
"required": true
}
],
"responses": {
"200": {
"description": "Resized image",
"schema": {
"type": "file"
}
},
"400": {
"description": "Bad request",
"schema": {
"type": "string"
}
},
"500": {
"description": "Internal server error",
"schema": {
"type": "string"
}
}
}
}
},
"/tools/sendsse": {
"post": {
"description": "Sends a message to a specified SSE channel",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"sse",
"tools"
],
"summary": "Send SSE message",
"parameters": [
{
"type": "string",
"description": "Channel name",
"name": "channel",
"in": "query"
},
{
"type": "string",
"description": "Message to send",
"name": "message",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"400": {
"description": "Bad Request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
}
}
}