Files
DurpAPI/docs/docs.go
2024-05-09 17:57:32 -05:00

318 lines
9.7 KiB
Go

// Package docs Code generated by swaggo/swag. DO NOT EDIT
package docs
import "github.com/swaggo/swag"
const docTemplate = `{
"schemes": {{ marshal .Schemes }},
"swagger": "2.0",
"info": {
"description": "{{escape .Description}}",
"title": "{{.Title}}",
"termsOfService": "http://swagger.io/terms/",
"contact": {
"name": "API Support",
"url": "https://durp.info",
"email": "developerdurp@durp.info"
},
"license": {
"name": "Apache 2.0",
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
},
"version": "{{.Version}}"
},
"host": "{{.Host}}",
"basePath": "{{.BasePath}}",
"paths": {
"/health/gethealth": {
"get": {
"security": [
{
"Authorization": []
}
],
"description": "Get the health of the API",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"health"
],
"summary": "Generate Health status",
"responses": {
"200": {
"description": "response",
"schema": {
"$ref": "#/definitions/model.Message"
}
},
"500": {
"description": "error",
"schema": {
"$ref": "#/definitions/model.Message"
}
}
}
}
},
"/jokes/dadjoke": {
"get": {
"security": [
{
"Authorization": []
}
],
"description": "get a dad joke",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"DadJoke"
],
"summary": "Get dadjoke",
"responses": {
"200": {
"description": "response",
"schema": {
"$ref": "#/definitions/model.Message"
}
},
"500": {
"description": "error",
"schema": {
"$ref": "#/definitions/stdmodels.StandardError"
}
}
}
},
"post": {
"security": [
{
"Authorization": []
}
],
"description": "create a dad joke",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"DadJoke"
],
"summary": "Generate dadjoke",
"parameters": [
{
"type": "string",
"description": "Dad Joke you wish to enter into database",
"name": "joke",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "response",
"schema": {
"$ref": "#/definitions/model.Message"
}
},
"500": {
"description": "error",
"schema": {
"$ref": "#/definitions/stdmodels.StandardError"
}
}
}
},
"delete": {
"security": [
{
"Authorization": []
}
],
"description": "create a dad joke",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"DadJoke"
],
"summary": "Generate dadjoke",
"parameters": [
{
"type": "string",
"description": "Dad joke you wish to delete from the database",
"name": "joke",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "response",
"schema": {
"$ref": "#/definitions/model.Message"
}
},
"500": {
"description": "error",
"schema": {
"$ref": "#/definitions/stdmodels.StandardError"
}
}
}
}
},
"/openai/general": {
"get": {
"security": [
{
"Authorization": []
}
],
"description": "Ask ChatGPT a general question",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"openai"
],
"summary": "Gerneral ChatGPT",
"parameters": [
{
"type": "string",
"description": "Ask ChatGPT a general question",
"name": "message",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "response",
"schema": {
"$ref": "#/definitions/model.Message"
}
},
"400": {
"description": "error",
"schema": {
"$ref": "#/definitions/model.Message"
}
}
}
}
},
"/openai/travelagent": {
"get": {
"security": [
{
"Authorization": []
}
],
"description": "Ask ChatGPT for suggestions as if it was a travel agent",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"openai"
],
"summary": "Travel Agent ChatGPT",
"parameters": [
{
"type": "string",
"description": "Ask ChatGPT for suggestions as a travel agent",
"name": "message",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "response",
"schema": {
"$ref": "#/definitions/model.Message"
}
},
"400": {
"description": "error",
"schema": {
"$ref": "#/definitions/model.Message"
}
}
}
}
}
},
"definitions": {
"model.Message": {
"type": "object",
"properties": {
"message": {
"type": "string",
"example": "message"
}
}
},
"stdmodels.StandardError": {
"type": "object",
"properties": {
"description": {
"type": "array",
"items": {
"type": "string"
}
},
"message": {
"type": "string"
},
"status": {
"type": "integer"
}
}
}
},
"securityDefinitions": {
"Authorization": {
"type": "apiKey",
"name": "Authorization",
"in": "header"
}
}
}`
// SwaggerInfo holds exported Swagger Info so clients can modify it
var SwaggerInfo = &swag.Spec{
Version: "",
Host: "",
BasePath: "/",
Schemes: []string{},
Title: "DurpAPI",
Description: "API for Durp's needs",
InfoInstanceName: "swagger",
SwaggerTemplate: docTemplate,
LeftDelim: "{{",
RightDelim: "}}",
}
func init() {
swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
}