Files
DurpAPI/docs/swagger.yaml
2023-06-24 10:34:49 -04:00

188 lines
4.2 KiB
YAML

basePath: /api/v1
definitions:
model.Message:
properties:
message:
example: message
type: string
type: object
model.PowerSupply:
properties:
3v_load:
type: integer
3v_watts:
type: integer
5v_load:
type: integer
5v_watts:
type: integer
12v_load:
type: integer
12v_watts:
type: integer
capacity:
type: string
efficiency:
type: integer
fan_rpm:
type: integer
load:
type: integer
poweredon:
type: string
poweredon_raw:
type: string
product:
type: string
temp1:
type: integer
temp2:
type: integer
uptime:
type: string
uptime_raw:
type: string
vendor:
type: string
watts:
type: integer
type: object
info:
contact:
email: developerdurp@durp.info
name: API Support
url: https://durp.info
description: API for Durp's needs
license:
name: Apache 2.0
url: http://www.apache.org/licenses/LICENSE-2.0.html
termsOfService: http://swagger.io/terms/
title: DurpAPI
paths:
/health/getHealth:
get:
consumes:
- application/json
description: Get the health of the API
produces:
- application/json
responses:
"200":
description: response
schema:
$ref: '#/definitions/model.Message'
"400":
description: error
schema:
$ref: '#/definitions/model.Message'
summary: Generate Health status
tags:
- health
/jokes/dadjoke:
get:
consumes:
- application/json
description: get a dad joke
produces:
- application/json
responses:
"200":
description: response
schema:
$ref: '#/definitions/model.Message'
"400":
description: error
schema:
$ref: '#/definitions/model.Message'
summary: Generate dadjoke
tags:
- DadJoke
post:
consumes:
- application/json
description: create a dad joke
produces:
- application/json
responses:
"200":
description: response
schema:
$ref: '#/definitions/model.Message'
"400":
description: error
schema:
$ref: '#/definitions/model.Message'
summary: Generate dadjoke
tags:
- DadJoke
/openai/general:
get:
consumes:
- application/json
description: Ask ChatGPT a general question
parameters:
- description: Ask ChatGPT a general question
in: query
name: message
required: true
type: string
produces:
- application/json
responses:
"200":
description: response
schema:
$ref: '#/definitions/model.Message'
"400":
description: error
schema:
$ref: '#/definitions/model.Message'
summary: Gerneral ChatGPT
tags:
- openai
/openai/travelagent:
get:
consumes:
- application/json
description: Ask ChatGPT for suggestions as if it was a travel agent
parameters:
- description: Ask ChatGPT for suggestions as a travel agent
in: query
name: message
required: true
type: string
produces:
- application/json
responses:
"200":
description: response
schema:
$ref: '#/definitions/model.Message'
"400":
description: error
schema:
$ref: '#/definitions/model.Message'
summary: Travel Agent ChatGPT
tags:
- openai
/unraid/powerusage:
get:
consumes:
- application/json
description: Gets the PSU Data from unraid
produces:
- application/json
responses:
"200":
description: response
schema:
$ref: '#/definitions/model.PowerSupply'
"412":
description: error
schema:
$ref: '#/definitions/model.Message'
summary: Unraid PSU Stats
tags:
- unraid
swagger: "2.0"