Merge pull request #3427 from bluewave-labs/fix/swagger-post-monitor-schema
fix: updating swagger for createMonitor and /monitor/teams
This commit is contained in:
1 file changed
+90
-89
+90
-89
@@ -510,42 +510,24 @@
|
|||||||
"summary": "Get monitors by team",
|
"summary": "Get monitors by team",
|
||||||
"description": "Get monitors filtered by team with optional parameters",
|
"description": "Get monitors filtered by team with optional parameters",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
|
||||||
"name": "status",
|
|
||||||
"in": "query",
|
|
||||||
"description": "Filter by monitor status (up/down)",
|
|
||||||
"schema": {
|
|
||||||
"type": "boolean"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "type",
|
"name": "type",
|
||||||
"in": "query",
|
"in": "query",
|
||||||
"description": "Filter by monitor type",
|
"description": "Filter by monitor type",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "string",
|
"oneOf": [
|
||||||
"enum": ["http", "ping", "pagespeed", "hardware", "docker", "port"]
|
{
|
||||||
}
|
"type": "string",
|
||||||
},
|
"enum": ["http", "ping", "pagespeed", "docker", "hardware", "port", "game", "grpc", "websocket"]
|
||||||
{
|
},
|
||||||
"name": "page",
|
{
|
||||||
"in": "query",
|
"type": "array",
|
||||||
"description": "Page number for pagination",
|
"items": {
|
||||||
"schema": {
|
"type": "string",
|
||||||
"type": "integer",
|
"enum": ["http", "ping", "pagespeed", "docker", "hardware", "port", "game", "grpc", "websocket"]
|
||||||
"minimum": 1,
|
}
|
||||||
"default": 1
|
}
|
||||||
}
|
]
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "rowsPerPage",
|
|
||||||
"in": "query",
|
|
||||||
"description": "Number of monitors per page",
|
|
||||||
"schema": {
|
|
||||||
"type": "integer",
|
|
||||||
"minimum": 1,
|
|
||||||
"maximum": 100,
|
|
||||||
"default": 10
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -555,15 +537,6 @@
|
|||||||
"schema": {
|
"schema": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "field",
|
|
||||||
"in": "query",
|
|
||||||
"description": "Field to filter on",
|
|
||||||
"schema": {
|
|
||||||
"type": "string",
|
|
||||||
"enum": ["name", "url", "description"]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
@@ -3568,22 +3541,19 @@
|
|||||||
},
|
},
|
||||||
"CreateMonitorRequest": {
|
"CreateMonitorRequest": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": ["name", "description", "type", "url", "interval"],
|
"required": ["name", "type", "url"],
|
||||||
"properties": {
|
"properties": {
|
||||||
"name": {
|
"name": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"minLength": 1,
|
|
||||||
"maxLength": 100,
|
|
||||||
"example": "My Website Monitor"
|
"example": "My Website Monitor"
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"maxLength": 500,
|
|
||||||
"example": "Monitors the main website homepage"
|
"example": "Monitors the main website homepage"
|
||||||
},
|
},
|
||||||
"type": {
|
"type": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"enum": ["http", "ping", "pagespeed", "hardware", "docker", "port"],
|
"enum": ["http", "ping", "pagespeed", "hardware", "docker", "port", "game", "grpc", "websocket"],
|
||||||
"example": "http"
|
"example": "http"
|
||||||
},
|
},
|
||||||
"url": {
|
"url": {
|
||||||
@@ -3593,14 +3563,34 @@
|
|||||||
},
|
},
|
||||||
"interval": {
|
"interval": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"minimum": 30,
|
|
||||||
"maximum": 3600,
|
|
||||||
"example": 300,
|
"example": 300,
|
||||||
"description": "Check interval in seconds"
|
"description": "Check interval in seconds"
|
||||||
},
|
},
|
||||||
|
"statusWindowSize": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1,
|
||||||
|
"maximum": 20,
|
||||||
|
"default": 5
|
||||||
|
},
|
||||||
|
"statusWindowThreshold": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1,
|
||||||
|
"maximum": 100,
|
||||||
|
"default": 60
|
||||||
|
},
|
||||||
"isActive": {
|
"isActive": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"ignoreTlsErrors": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"default": true
|
"default": false
|
||||||
|
},
|
||||||
|
"useAdvancedMatching": {
|
||||||
|
"type": "boolean",
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
|
"port": {
|
||||||
|
"type": "integer"
|
||||||
},
|
},
|
||||||
"notifications": {
|
"notifications": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
@@ -3609,51 +3599,62 @@
|
|||||||
},
|
},
|
||||||
"description": "Array of notification IDs to associate with this monitor"
|
"description": "Array of notification IDs to associate with this monitor"
|
||||||
},
|
},
|
||||||
"httpOptions": {
|
"secret": {
|
||||||
"type": "object",
|
"type": "string"
|
||||||
"properties": {
|
|
||||||
"method": {
|
|
||||||
"type": "string",
|
|
||||||
"enum": ["GET", "POST", "PUT", "DELETE", "HEAD"],
|
|
||||||
"default": "GET"
|
|
||||||
},
|
|
||||||
"headers": {
|
|
||||||
"type": "object",
|
|
||||||
"additionalProperties": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"body": {
|
|
||||||
"type": "string",
|
|
||||||
"description": "Request body for POST/PUT requests"
|
|
||||||
},
|
|
||||||
"timeout": {
|
|
||||||
"type": "integer",
|
|
||||||
"minimum": 1000,
|
|
||||||
"maximum": 30000,
|
|
||||||
"default": 5000,
|
|
||||||
"description": "Request timeout in milliseconds"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"assertions": {
|
"jsonPath": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"expectedValue": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"matchMethod": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": ["equal", "include", "regex", ""]
|
||||||
|
},
|
||||||
|
"cpuAlertThreshold": {
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
"memoryAlertThreshold": {
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
"diskAlertThreshold": {
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
"tempAlertThreshold": {
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
"gameId": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"grpcServiceName": {
|
||||||
|
"type": "string",
|
||||||
|
"default": ""
|
||||||
|
},
|
||||||
|
"selectedDisks": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"type": "object",
|
"type": "string"
|
||||||
"properties": {
|
|
||||||
"type": {
|
|
||||||
"type": "string",
|
|
||||||
"enum": ["status-code", "response-time", "body-contains", "header-contains"]
|
|
||||||
},
|
|
||||||
"comparison": {
|
|
||||||
"type": "string",
|
|
||||||
"enum": ["equals", "not-equals", "greater-than", "less-than", "contains", "not-contains"]
|
|
||||||
},
|
|
||||||
"value": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"group": {
|
||||||
|
"type": "string",
|
||||||
|
"nullable": true,
|
||||||
|
"maxLength": 50
|
||||||
|
},
|
||||||
|
"geoCheckEnabled": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"geoCheckLocations": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": ["northAmerica", "southAmerica", "europe", "asia", "africa", "oceania"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"geoCheckInterval": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 300000
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in new issue
Block a user