LocalhostBunny/swagger/swagger.yaml

219 lines
4.9 KiB
YAML
Raw Normal View History

2023-12-01 09:56:06 +01:00
basePath: /api/v1/
definitions:
handler.Health.response:
properties:
status:
type: string
type: object
handler.ListServer.response:
properties:
server:
items:
$ref: '#/definitions/models.Server'
type: array
type: object
handler.Sleep.response:
properties:
duration:
type: number
end:
type: string
start:
type: string
type: object
handler.pingResponse:
properties:
info:
$ref: '#/definitions/handler.pingResponseInfo'
message:
type: string
type: object
handler.pingResponseInfo:
properties:
addr:
type: string
headers:
additionalProperties:
items:
type: string
type: array
type: object
method:
type: string
request:
type: string
uri:
type: string
type: object
models.APIError:
properties:
errorcode:
type: string
fapiMessage:
type: string
message:
type: string
type: object
models.Server:
properties:
2023-12-01 11:24:22 +01:00
contentType:
type: string
ip:
type: string
pid:
type: integer
2023-12-01 09:56:06 +01:00
port:
type: integer
2023-12-01 11:24:22 +01:00
process:
type: string
protocol:
type: string
response:
type: string
sockState:
type: string
statusCode:
type: integer
uid:
type: integer
2023-12-01 09:56:06 +01:00
type: object
host: localhost
info:
contact: {}
title: LocalHostBunny
version: "1.0"
paths:
2023-12-01 13:44:58 +01:00
/:
get:
responses: {}
summary: (Website)
2023-12-01 09:56:06 +01:00
/api/health:
get:
responses:
"200":
description: OK
schema:
$ref: '#/definitions/handler.Health.response'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/models.APIError'
summary: Server Health-checks
tags:
- Common
/api/ping:
delete:
responses:
"200":
description: OK
schema:
$ref: '#/definitions/handler.pingResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/models.APIError'
summary: Simple endpoint to test connection (any http method)
tags:
- Common
get:
responses:
"200":
description: OK
schema:
$ref: '#/definitions/handler.pingResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/models.APIError'
summary: Simple endpoint to test connection (any http method)
tags:
- Common
patch:
responses:
"200":
description: OK
schema:
$ref: '#/definitions/handler.pingResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/models.APIError'
summary: Simple endpoint to test connection (any http method)
tags:
- Common
post:
responses:
"200":
description: OK
schema:
$ref: '#/definitions/handler.pingResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/models.APIError'
summary: Simple endpoint to test connection (any http method)
tags:
- Common
put:
responses:
"200":
description: OK
schema:
$ref: '#/definitions/handler.pingResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/models.APIError'
summary: Simple endpoint to test connection (any http method)
tags:
- Common
/api/sleep/:secs:
post:
parameters:
- description: sleep delay (in seconds)
in: path
name: secs
required: true
type: number
responses:
"200":
description: OK
schema:
$ref: '#/definitions/handler.Sleep.response'
"400":
description: Bad Request
schema:
$ref: '#/definitions/models.APIError'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/models.APIError'
summary: Return 200 after x seconds
tags:
- Common
2023-12-01 13:44:58 +01:00
/index.html:
get:
responses: {}
summary: (Website)
/scripts.script.js:
get:
responses: {}
summary: (Website)
2023-12-01 09:56:06 +01:00
/server:
get:
responses:
"200":
description: OK
schema:
$ref: '#/definitions/handler.ListServer.response'
"400":
description: Bad Request
schema:
$ref: '#/definitions/models.APIError'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/models.APIError'
summary: List running server
swagger: "2.0"