Skip to content
This repository has been archived by the owner on May 30, 2022. It is now read-only.

Commit

Permalink
Update the swagger docs
Browse files Browse the repository at this point in the history
  • Loading branch information
arbulu89 committed Dec 22, 2021
1 parent cb41aa2 commit d301653
Show file tree
Hide file tree
Showing 3 changed files with 260 additions and 0 deletions.
98 changes: 98 additions & 0 deletions docs/api/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,49 @@ var doc = `{
}
}
},
"/checks/{id}/results": {
"post": {
"produces": [
"application/json"
],
"summary": "Create a checks results entry",
"parameters": [
{
"type": "string",
"description": "Resource Id",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Checks results",
"name": "Body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/web.JSONChecksResult"
}
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/web.JSONChecksResult"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/checks/{id}/settings": {
"get": {
"consumes": [
Expand Down Expand Up @@ -784,6 +827,26 @@ var doc = `{
}
}
},
"web.JSONCheckResult": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"group": {
"type": "string"
},
"hosts": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/web.JSONHosts"
}
},
"id": {
"type": "string"
}
}
},
"web.JSONChecksGroup": {
"type": "object",
"properties": {
Expand All @@ -798,6 +861,27 @@ var doc = `{
}
}
},
"web.JSONChecksResult": {
"type": "object",
"required": [
"checks",
"hosts"
],
"properties": {
"checks": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/web.JSONCheckResult"
}
},
"hosts": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/web.JSONHosts"
}
}
}
},
"web.JSONChecksSettings": {
"type": "object",
"required": [
Expand Down Expand Up @@ -825,6 +909,20 @@ var doc = `{
}
}
},
"web.JSONHosts": {
"type": "object",
"properties": {
"msg": {
"type": "string"
},
"reachable": {
"type": "boolean"
},
"result": {
"type": "string"
}
}
},
"web.JSONTag": {
"type": "object",
"required": [
Expand Down
98 changes: 98 additions & 0 deletions docs/api/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,49 @@
}
}
},
"/checks/{id}/results": {
"post": {
"produces": [
"application/json"
],
"summary": "Create a checks results entry",
"parameters": [
{
"type": "string",
"description": "Resource Id",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Checks results",
"name": "Body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/web.JSONChecksResult"
}
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/web.JSONChecksResult"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/checks/{id}/settings": {
"get": {
"consumes": [
Expand Down Expand Up @@ -772,6 +815,26 @@
}
}
},
"web.JSONCheckResult": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"group": {
"type": "string"
},
"hosts": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/web.JSONHosts"
}
},
"id": {
"type": "string"
}
}
},
"web.JSONChecksGroup": {
"type": "object",
"properties": {
Expand All @@ -786,6 +849,27 @@
}
}
},
"web.JSONChecksResult": {
"type": "object",
"required": [
"checks",
"hosts"
],
"properties": {
"checks": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/web.JSONCheckResult"
}
},
"hosts": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/web.JSONHosts"
}
}
}
},
"web.JSONChecksSettings": {
"type": "object",
"required": [
Expand Down Expand Up @@ -813,6 +897,20 @@
}
}
},
"web.JSONHosts": {
"type": "object",
"properties": {
"msg": {
"type": "string"
},
"reachable": {
"type": "boolean"
},
"result": {
"type": "string"
}
}
},
"web.JSONTag": {
"type": "object",
"required": [
Expand Down
64 changes: 64 additions & 0 deletions docs/api/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,19 @@ definitions:
- id
- name
type: object
web.JSONCheckResult:
properties:
description:
type: string
group:
type: string
hosts:
additionalProperties:
$ref: '#/definitions/web.JSONHosts'
type: object
id:
type: string
type: object
web.JSONChecksGroup:
properties:
checks:
Expand All @@ -79,6 +92,20 @@ definitions:
group:
type: string
type: object
web.JSONChecksResult:
properties:
checks:
additionalProperties:
$ref: '#/definitions/web.JSONCheckResult'
type: object
hosts:
additionalProperties:
$ref: '#/definitions/web.JSONHosts'
type: object
required:
- checks
- hosts
type: object
web.JSONChecksSettings:
properties:
connection_settings:
Expand All @@ -97,6 +124,15 @@ definitions:
- connection_settings
- selected_checks
type: object
web.JSONHosts:
properties:
msg:
type: string
reachable:
type: boolean
result:
type: string
type: object
web.JSONTag:
properties:
tag:
Expand All @@ -116,6 +152,34 @@ info:
title: Trento API
version: "1.0"
paths:
/checks/{id}/results:
post:
parameters:
- description: Resource Id
in: path
name: id
required: true
type: string
- description: Checks results
in: body
name: Body
required: true
schema:
$ref: '#/definitions/web.JSONChecksResult'
produces:
- application/json
responses:
"201":
description: Created
schema:
$ref: '#/definitions/web.JSONChecksResult'
"500":
description: Internal Server Error
schema:
additionalProperties:
type: string
type: object
summary: Create a checks results entry
/checks/{id}/settings:
get:
consumes:
Expand Down

0 comments on commit d301653

Please sign in to comment.