Added deployments overview
This commit is contained in:
@@ -250,6 +250,50 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/deployments/{id}": {
|
||||
"get": {
|
||||
"description": "Get a single deployment by its ID",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Deployments"
|
||||
],
|
||||
"summary": "Get deployment by ID",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Deployment ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/models.Deployment"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Not Found",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/models.APIError"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/models.APIError"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/forward-rules/{id}": {
|
||||
"get": {
|
||||
"description": "Returns a single forward rule by ID",
|
||||
@@ -832,6 +876,50 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/sites/{id}/enabled": {
|
||||
"patch": {
|
||||
"description": "Enable or disable a site by its ID",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Sites"
|
||||
],
|
||||
"summary": "Toggle site enabled status",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Site ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/models.ToggleEnabledResponse"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Not Found",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/models.APIError"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/models.APIError"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/sites/{id}/forward-rules": {
|
||||
"get": {
|
||||
"description": "Returns all forward rules associated with the given site",
|
||||
@@ -932,6 +1020,51 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/sites/{siteId}/deployments": {
|
||||
"get": {
|
||||
"description": "Get a list of deployments for a specific site",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Deployments"
|
||||
],
|
||||
"summary": "Get deployments for a site",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Site ID",
|
||||
"name": "siteId",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"default": 100,
|
||||
"description": "Maximum number of deployments to return",
|
||||
"name": "limit",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/models.GetDeploymentsBySiteResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/models.APIError"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
@@ -966,11 +1099,58 @@ const docTemplate = `{
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"regex": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"source": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.Deployment": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"commit_hash": {
|
||||
"type": "string"
|
||||
},
|
||||
"created_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"finish_time": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"site_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"start_time": {
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"$ref": "#/definitions/models.DeploymentStatus"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.DeploymentStatus": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"pending",
|
||||
"running",
|
||||
"success",
|
||||
"failed"
|
||||
],
|
||||
"x-enum-varnames": [
|
||||
"DeploymentStatusPending",
|
||||
"DeploymentStatusRunning",
|
||||
"DeploymentStatusSuccess",
|
||||
"DeploymentStatusFailed"
|
||||
]
|
||||
},
|
||||
"models.ForwardRule": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -1005,6 +1185,20 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.GetDeploymentsBySiteResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"deployments": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/models.Deployment"
|
||||
}
|
||||
},
|
||||
"total": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.Header": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -1025,6 +1219,9 @@ const docTemplate = `{
|
||||
"branch": {
|
||||
"type": "string"
|
||||
},
|
||||
"created_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"custom_headers": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
@@ -1052,6 +1249,12 @@ const docTemplate = `{
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"index_file": {
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"not_found_file": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -1063,6 +1266,17 @@ const docTemplate = `{
|
||||
},
|
||||
"spa": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"trailing_slash": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.ToggleEnabledResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"enabled": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -244,6 +244,50 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/deployments/{id}": {
|
||||
"get": {
|
||||
"description": "Get a single deployment by its ID",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Deployments"
|
||||
],
|
||||
"summary": "Get deployment by ID",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Deployment ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/models.Deployment"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Not Found",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/models.APIError"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/models.APIError"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/forward-rules/{id}": {
|
||||
"get": {
|
||||
"description": "Returns a single forward rule by ID",
|
||||
@@ -826,6 +870,50 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/sites/{id}/enabled": {
|
||||
"patch": {
|
||||
"description": "Enable or disable a site by its ID",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Sites"
|
||||
],
|
||||
"summary": "Toggle site enabled status",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Site ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/models.ToggleEnabledResponse"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Not Found",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/models.APIError"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/models.APIError"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/sites/{id}/forward-rules": {
|
||||
"get": {
|
||||
"description": "Returns all forward rules associated with the given site",
|
||||
@@ -926,6 +1014,51 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/sites/{siteId}/deployments": {
|
||||
"get": {
|
||||
"description": "Get a list of deployments for a specific site",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Deployments"
|
||||
],
|
||||
"summary": "Get deployments for a site",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Site ID",
|
||||
"name": "siteId",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"default": 100,
|
||||
"description": "Maximum number of deployments to return",
|
||||
"name": "limit",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/models.GetDeploymentsBySiteResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/models.APIError"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
@@ -960,11 +1093,58 @@
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"regex": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"source": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.Deployment": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"commit_hash": {
|
||||
"type": "string"
|
||||
},
|
||||
"created_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"finish_time": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"site_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"start_time": {
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"$ref": "#/definitions/models.DeploymentStatus"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.DeploymentStatus": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"pending",
|
||||
"running",
|
||||
"success",
|
||||
"failed"
|
||||
],
|
||||
"x-enum-varnames": [
|
||||
"DeploymentStatusPending",
|
||||
"DeploymentStatusRunning",
|
||||
"DeploymentStatusSuccess",
|
||||
"DeploymentStatusFailed"
|
||||
]
|
||||
},
|
||||
"models.ForwardRule": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -999,6 +1179,20 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.GetDeploymentsBySiteResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"deployments": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/models.Deployment"
|
||||
}
|
||||
},
|
||||
"total": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.Header": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -1019,6 +1213,9 @@
|
||||
"branch": {
|
||||
"type": "string"
|
||||
},
|
||||
"created_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"custom_headers": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
@@ -1046,6 +1243,12 @@
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"index_file": {
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"not_found_file": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -1057,6 +1260,17 @@
|
||||
},
|
||||
"spa": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"trailing_slash": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.ToggleEnabledResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"enabled": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,9 +20,42 @@ definitions:
|
||||
type: array
|
||||
id:
|
||||
type: string
|
||||
regex:
|
||||
type: boolean
|
||||
source:
|
||||
type: string
|
||||
type: object
|
||||
models.Deployment:
|
||||
properties:
|
||||
commit_hash:
|
||||
type: string
|
||||
created_at:
|
||||
type: string
|
||||
finish_time:
|
||||
type: string
|
||||
id:
|
||||
type: string
|
||||
message:
|
||||
type: string
|
||||
site_id:
|
||||
type: string
|
||||
start_time:
|
||||
type: string
|
||||
status:
|
||||
$ref: '#/definitions/models.DeploymentStatus'
|
||||
type: object
|
||||
models.DeploymentStatus:
|
||||
enum:
|
||||
- pending
|
||||
- running
|
||||
- success
|
||||
- failed
|
||||
type: string
|
||||
x-enum-varnames:
|
||||
- DeploymentStatusPending
|
||||
- DeploymentStatusRunning
|
||||
- DeploymentStatusSuccess
|
||||
- DeploymentStatusFailed
|
||||
models.ForwardRule:
|
||||
properties:
|
||||
destination:
|
||||
@@ -45,6 +78,15 @@ definitions:
|
||||
total:
|
||||
type: integer
|
||||
type: object
|
||||
models.GetDeploymentsBySiteResponse:
|
||||
properties:
|
||||
deployments:
|
||||
items:
|
||||
$ref: '#/definitions/models.Deployment'
|
||||
type: array
|
||||
total:
|
||||
type: integer
|
||||
type: object
|
||||
models.Header:
|
||||
properties:
|
||||
id:
|
||||
@@ -58,6 +100,8 @@ definitions:
|
||||
properties:
|
||||
branch:
|
||||
type: string
|
||||
created_at:
|
||||
type: string
|
||||
custom_headers:
|
||||
items:
|
||||
$ref: '#/definitions/models.CustomHeaders'
|
||||
@@ -76,6 +120,10 @@ definitions:
|
||||
type: string
|
||||
id:
|
||||
type: string
|
||||
index_file:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
not_found_file:
|
||||
type: string
|
||||
owner:
|
||||
@@ -84,6 +132,13 @@ definitions:
|
||||
type: string
|
||||
spa:
|
||||
type: boolean
|
||||
trailing_slash:
|
||||
type: boolean
|
||||
type: object
|
||||
models.ToggleEnabledResponse:
|
||||
properties:
|
||||
enabled:
|
||||
type: boolean
|
||||
type: object
|
||||
host: localhost:4321
|
||||
info:
|
||||
@@ -249,6 +304,35 @@ paths:
|
||||
summary: Create a header
|
||||
tags:
|
||||
- Headers
|
||||
/deployments/{id}:
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Get a single deployment by its ID
|
||||
parameters:
|
||||
- description: Deployment ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: string
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/models.Deployment'
|
||||
"404":
|
||||
description: Not Found
|
||||
schema:
|
||||
$ref: '#/definitions/models.APIError'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/models.APIError'
|
||||
summary: Get deployment by ID
|
||||
tags:
|
||||
- Deployments
|
||||
/forward-rules/{id}:
|
||||
delete:
|
||||
description: Deletes a forward rule by ID
|
||||
@@ -635,6 +719,35 @@ paths:
|
||||
summary: Create a custom header group
|
||||
tags:
|
||||
- Custom-Headers
|
||||
/sites/{id}/enabled:
|
||||
patch:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Enable or disable a site by its ID
|
||||
parameters:
|
||||
- description: Site ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: string
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/models.ToggleEnabledResponse'
|
||||
"404":
|
||||
description: Not Found
|
||||
schema:
|
||||
$ref: '#/definitions/models.APIError'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/models.APIError'
|
||||
summary: Toggle site enabled status
|
||||
tags:
|
||||
- Sites
|
||||
/sites/{id}/forward-rules:
|
||||
get:
|
||||
description: Returns all forward rules associated with the given site
|
||||
@@ -702,6 +815,36 @@ paths:
|
||||
summary: Create a forward rule
|
||||
tags:
|
||||
- Forward-Rules
|
||||
/sites/{siteId}/deployments:
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Get a list of deployments for a specific site
|
||||
parameters:
|
||||
- description: Site ID
|
||||
in: path
|
||||
name: siteId
|
||||
required: true
|
||||
type: string
|
||||
- default: 100
|
||||
description: Maximum number of deployments to return
|
||||
in: query
|
||||
name: limit
|
||||
type: integer
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/models.GetDeploymentsBySiteResponse'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/models.APIError'
|
||||
summary: Get deployments for a site
|
||||
tags:
|
||||
- Deployments
|
||||
swagger: "2.0"
|
||||
tags:
|
||||
- description: Manage sites
|
||||
|
||||
Reference in New Issue
Block a user