Files
DurpAPI/docs/swagger.yaml

185 lines
4.4 KiB
YAML

basePath: /
definitions:
stdmodels.StandardError:
properties:
description:
items:
type: string
type: array
message:
type: string
status:
type: integer
type: object
stdmodels.StandardMessage:
properties:
message:
type: string
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/stdmodels.StandardMessage'
"500":
description: error
schema:
$ref: '#/definitions/stdmodels.StandardError'
security:
- Authorization: []
summary: Generate Health status
tags:
- health
/jokes/dadjoke:
delete:
consumes:
- application/json
description: create a dad joke
parameters:
- description: Dad joke you wish to delete from the database
in: query
name: joke
required: true
type: string
produces:
- application/json
responses:
"200":
description: response
schema:
$ref: '#/definitions/stdmodels.StandardMessage'
"500":
description: error
schema:
$ref: '#/definitions/stdmodels.StandardError'
security:
- Authorization: []
summary: Generate dadjoke
tags:
- DadJoke
get:
consumes:
- application/json
description: get a dad joke
produces:
- application/json
responses:
"200":
description: response
schema:
$ref: '#/definitions/stdmodels.StandardMessage'
"500":
description: error
schema:
$ref: '#/definitions/stdmodels.StandardError'
security:
- Authorization: []
summary: Get dadjoke
tags:
- DadJoke
post:
consumes:
- application/json
description: create a dad joke
parameters:
- description: Dad Joke you wish to enter into database
in: query
name: joke
required: true
type: string
produces:
- application/json
responses:
"200":
description: response
schema:
$ref: '#/definitions/stdmodels.StandardMessage'
"500":
description: error
schema:
$ref: '#/definitions/stdmodels.StandardError'
security:
- Authorization: []
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/stdmodels.StandardMessage'
"500":
description: error
schema:
$ref: '#/definitions/stdmodels.StandardError'
security:
- Authorization: []
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/stdmodels.StandardMessage'
"500":
description: error
schema:
$ref: '#/definitions/stdmodels.StandardError'
security:
- Authorization: []
summary: Travel Agent ChatGPT
tags:
- openai
securityDefinitions:
Authorization:
in: header
name: Authorization
type: apiKey
swagger: "2.0"