Skip to content

Commit

Permalink
remove Update, List, Delete methods (#127)
Browse files Browse the repository at this point in the history
  • Loading branch information
DoctorVin authored Oct 25, 2023
1 parent 892e108 commit 3a29362
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 1,030 deletions.
119 changes: 8 additions & 111 deletions docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,41 +51,6 @@ const docTemplate = `{
}
}
},
"put": {
"description": "Updates a condition on a server",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"summary": "Condition Update",
"operationId": "serverConditionUpdate",
"parameters": [
{
"type": "string",
"description": "Server ID",
"name": "uuid",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Condition Kind",
"name": "conditionKind",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/types.ServerResponse"
}
}
}
},
"post": {
"description": "Creates a condition on a server\nSample firmwareInstall payload, response: https://github.com/metal-toolbox/conditionorc/blob/main/sample/firmwareInstall.md",
"consumes": [
Expand Down Expand Up @@ -119,85 +84,17 @@ const docTemplate = `{
}
}
}
},
"delete": {
"description": "Deletes a condition on a server",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"summary": "Condition Delete",
"operationId": "serverConditionDelete",
"parameters": [
{
"type": "string",
"description": "Server ID",
"name": "uuid",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Condition Kind",
"name": "conditionKind",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/types.ServerResponse"
}
}
}
}
},
"/servers/{uuid}/state/{conditionState}": {
"get": {
"description": "Returns all conditions set on a server by the condition state.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"summary": "Condition List",
"operationId": "serverConditionList",
"parameters": [
{
"type": "string",
"description": "Server ID",
"name": "uuid",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Condition State",
"name": "conditionState",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/types.ServerResponse"
}
}
}
}
}
},
"definitions": {
"condition.Condition": {
"type": "object",
"properties": {
"client": {
"description": "Client is the user/jwt user that requested the condition.",
"type": "string"
},
"createdAt": {
"description": "CreatedAt is when this object was created.",
"type": "string"
Expand Down Expand Up @@ -286,14 +183,14 @@ const docTemplate = `{
"condition.Kind": {
"type": "string",
"enum": [
"firmwareInstall",
"inventory",
"virtualMediaMount"
"virtualMediaMount",
"firmwareInstall"
],
"x-enum-varnames": [
"FirmwareInstall",
"Inventory",
"VirtualMediaMount"
"VirtualMediaMount",
"FirmwareInstall"
]
},
"condition.State": {
Expand Down
119 changes: 8 additions & 111 deletions docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,41 +43,6 @@
}
}
},
"put": {
"description": "Updates a condition on a server",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"summary": "Condition Update",
"operationId": "serverConditionUpdate",
"parameters": [
{
"type": "string",
"description": "Server ID",
"name": "uuid",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Condition Kind",
"name": "conditionKind",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/types.ServerResponse"
}
}
}
},
"post": {
"description": "Creates a condition on a server\nSample firmwareInstall payload, response: https://github.com/metal-toolbox/conditionorc/blob/main/sample/firmwareInstall.md",
"consumes": [
Expand Down Expand Up @@ -111,85 +76,17 @@
}
}
}
},
"delete": {
"description": "Deletes a condition on a server",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"summary": "Condition Delete",
"operationId": "serverConditionDelete",
"parameters": [
{
"type": "string",
"description": "Server ID",
"name": "uuid",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Condition Kind",
"name": "conditionKind",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/types.ServerResponse"
}
}
}
}
},
"/servers/{uuid}/state/{conditionState}": {
"get": {
"description": "Returns all conditions set on a server by the condition state.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"summary": "Condition List",
"operationId": "serverConditionList",
"parameters": [
{
"type": "string",
"description": "Server ID",
"name": "uuid",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Condition State",
"name": "conditionState",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/types.ServerResponse"
}
}
}
}
}
},
"definitions": {
"condition.Condition": {
"type": "object",
"properties": {
"client": {
"description": "Client is the user/jwt user that requested the condition.",
"type": "string"
},
"createdAt": {
"description": "CreatedAt is when this object was created.",
"type": "string"
Expand Down Expand Up @@ -278,14 +175,14 @@
"condition.Kind": {
"type": "string",
"enum": [
"firmwareInstall",
"inventory",
"virtualMediaMount"
"virtualMediaMount",
"firmwareInstall"
],
"x-enum-varnames": [
"FirmwareInstall",
"Inventory",
"VirtualMediaMount"
"VirtualMediaMount",
"FirmwareInstall"
]
},
"condition.State": {
Expand Down
Loading

0 comments on commit 3a29362

Please sign in to comment.