Skip to content

Commit

Permalink
Merge pull request #69 from yunkon-kim/240605-17
Browse files Browse the repository at this point in the history
Enhance the delete mechanism for enrichments, env, and terrarium
  • Loading branch information
yunkon-kim authored Jun 5, 2024
2 parents b1786b2 + 293415c commit a816773
Show file tree
Hide file tree
Showing 12 changed files with 112 additions and 85 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,4 +203,4 @@ Note - You can find API documentation on Swagger UI.
5. GET /tr/{trId}/vpn/gcp-azure/request/{requestId}/status (Check the above API status)
6. GET /tr/{trId}/vpn/gcp-azure (Get resource info with detail (refined, raw))
7. DELETE /tr/{trId}/vpn/gcp-azure (Time-consuming API, return a request ID and be processed asynchronously)
8. DELETE /tr/{trId}/vpn/gcp-azure/clear
8. DELETE /tr/{trId}/vpn/gcp-azure/env
63 changes: 33 additions & 30 deletions pkg/api/rest/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ const docTemplate = `{
}
}
},
"/test-env/clear": {
"/test-env/env": {
"delete": {
"description": "Clear the entire directory and configuration files",
"consumes": [
Expand Down Expand Up @@ -1008,9 +1008,9 @@ const docTemplate = `{
}
}
},
"/tr/{trId}/vpn/gcp-aws/clear": {
"delete": {
"description": "Clear the entire directory and configuration files",
"/tr/{trId}/vpn/gcp-aws/env": {
"post": {
"description": "Initialize a multi-cloud terrarium for GCP to AWS VPN tunnel",
"consumes": [
"application/json"
],
Expand All @@ -1020,7 +1020,7 @@ const docTemplate = `{
"tags": [
"[VPN] GCP to AWS VPN tunnel configuration"
],
"summary": "Clear the entire directory and configuration files",
"summary": "Initialize a multi-cloud terrarium for GCP to AWS VPN tunnel",
"parameters": [
{
"type": "string",
Expand All @@ -1038,8 +1038,8 @@ const docTemplate = `{
}
],
"responses": {
"200": {
"description": "OK",
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/model.Response"
}
Expand All @@ -1063,11 +1063,9 @@ const docTemplate = `{
}
}
}
}
},
"/tr/{trId}/vpn/gcp-aws/env": {
"post": {
"description": "Initialize a multi-cloud terrarium for GCP to AWS VPN tunnel",
},
"delete": {
"description": "Clear the entire directory and configuration files",
"consumes": [
"application/json"
],
Expand All @@ -1077,7 +1075,7 @@ const docTemplate = `{
"tags": [
"[VPN] GCP to AWS VPN tunnel configuration"
],
"summary": "Initialize a multi-cloud terrarium for GCP to AWS VPN tunnel",
"summary": "Clear the entire directory and configuration files",
"parameters": [
{
"type": "string",
Expand All @@ -1095,8 +1093,8 @@ const docTemplate = `{
}
],
"responses": {
"201": {
"description": "Created",
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/model.Response"
}
Expand Down Expand Up @@ -1477,9 +1475,9 @@ const docTemplate = `{
}
}
},
"/tr/{trId}/vpn/gcp-azure/clear": {
"delete": {
"description": "Clear the entire directory and configuration files",
"/tr/{trId}/vpn/gcp-azure/env": {
"post": {
"description": "Initialize a multi-cloud terrarium for GCP to Azure VPN tunnel",
"consumes": [
"application/json"
],
Expand All @@ -1489,7 +1487,7 @@ const docTemplate = `{
"tags": [
"[VPN] GCP to Azure VPN tunnel configuration (under development)"
],
"summary": "Clear the entire directory and configuration files",
"summary": "Initialize a multi-cloud terrarium for GCP to Azure VPN tunnel",
"parameters": [
{
"type": "string",
Expand All @@ -1507,8 +1505,8 @@ const docTemplate = `{
}
],
"responses": {
"200": {
"description": "OK",
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/model.Response"
}
Expand All @@ -1532,11 +1530,9 @@ const docTemplate = `{
}
}
}
}
},
"/tr/{trId}/vpn/gcp-azure/env": {
"post": {
"description": "Initialize a multi-cloud terrarium for GCP to Azure VPN tunnel",
},
"delete": {
"description": "Clear the entire directory and configuration files",
"consumes": [
"application/json"
],
Expand All @@ -1546,7 +1542,7 @@ const docTemplate = `{
"tags": [
"[VPN] GCP to Azure VPN tunnel configuration (under development)"
],
"summary": "Initialize a multi-cloud terrarium for GCP to Azure VPN tunnel",
"summary": "Clear the entire directory and configuration files",
"parameters": [
{
"type": "string",
Expand All @@ -1564,8 +1560,8 @@ const docTemplate = `{
}
],
"responses": {
"201": {
"description": "Created",
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/model.Response"
}
Expand Down Expand Up @@ -1910,15 +1906,22 @@ const docTemplate = `{
"model.Response": {
"type": "object",
"properties": {
"data": {},
"details": {
"type": "string",
"example": "Any details"
},
"list": {
"type": "array",
"items": {}
},
"message": {
"type": "string",
"example": "Any message"
},
"object": {
"type": "object",
"additionalProperties": true
},
"status": {
"type": "integer",
"example": 200
Expand Down
63 changes: 33 additions & 30 deletions pkg/api/rest/docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@
}
}
},
"/test-env/clear": {
"/test-env/env": {
"delete": {
"description": "Clear the entire directory and configuration files",
"consumes": [
Expand Down Expand Up @@ -1001,9 +1001,9 @@
}
}
},
"/tr/{trId}/vpn/gcp-aws/clear": {
"delete": {
"description": "Clear the entire directory and configuration files",
"/tr/{trId}/vpn/gcp-aws/env": {
"post": {
"description": "Initialize a multi-cloud terrarium for GCP to AWS VPN tunnel",
"consumes": [
"application/json"
],
Expand All @@ -1013,7 +1013,7 @@
"tags": [
"[VPN] GCP to AWS VPN tunnel configuration"
],
"summary": "Clear the entire directory and configuration files",
"summary": "Initialize a multi-cloud terrarium for GCP to AWS VPN tunnel",
"parameters": [
{
"type": "string",
Expand All @@ -1031,8 +1031,8 @@
}
],
"responses": {
"200": {
"description": "OK",
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/model.Response"
}
Expand All @@ -1056,11 +1056,9 @@
}
}
}
}
},
"/tr/{trId}/vpn/gcp-aws/env": {
"post": {
"description": "Initialize a multi-cloud terrarium for GCP to AWS VPN tunnel",
},
"delete": {
"description": "Clear the entire directory and configuration files",
"consumes": [
"application/json"
],
Expand All @@ -1070,7 +1068,7 @@
"tags": [
"[VPN] GCP to AWS VPN tunnel configuration"
],
"summary": "Initialize a multi-cloud terrarium for GCP to AWS VPN tunnel",
"summary": "Clear the entire directory and configuration files",
"parameters": [
{
"type": "string",
Expand All @@ -1088,8 +1086,8 @@
}
],
"responses": {
"201": {
"description": "Created",
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/model.Response"
}
Expand Down Expand Up @@ -1470,9 +1468,9 @@
}
}
},
"/tr/{trId}/vpn/gcp-azure/clear": {
"delete": {
"description": "Clear the entire directory and configuration files",
"/tr/{trId}/vpn/gcp-azure/env": {
"post": {
"description": "Initialize a multi-cloud terrarium for GCP to Azure VPN tunnel",
"consumes": [
"application/json"
],
Expand All @@ -1482,7 +1480,7 @@
"tags": [
"[VPN] GCP to Azure VPN tunnel configuration (under development)"
],
"summary": "Clear the entire directory and configuration files",
"summary": "Initialize a multi-cloud terrarium for GCP to Azure VPN tunnel",
"parameters": [
{
"type": "string",
Expand All @@ -1500,8 +1498,8 @@
}
],
"responses": {
"200": {
"description": "OK",
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/model.Response"
}
Expand All @@ -1525,11 +1523,9 @@
}
}
}
}
},
"/tr/{trId}/vpn/gcp-azure/env": {
"post": {
"description": "Initialize a multi-cloud terrarium for GCP to Azure VPN tunnel",
},
"delete": {
"description": "Clear the entire directory and configuration files",
"consumes": [
"application/json"
],
Expand All @@ -1539,7 +1535,7 @@
"tags": [
"[VPN] GCP to Azure VPN tunnel configuration (under development)"
],
"summary": "Initialize a multi-cloud terrarium for GCP to Azure VPN tunnel",
"summary": "Clear the entire directory and configuration files",
"parameters": [
{
"type": "string",
Expand All @@ -1557,8 +1553,8 @@
}
],
"responses": {
"201": {
"description": "Created",
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/model.Response"
}
Expand Down Expand Up @@ -1903,15 +1899,22 @@
"model.Response": {
"type": "object",
"properties": {
"data": {},
"details": {
"type": "string",
"example": "Any details"
},
"list": {
"type": "array",
"items": {}
},
"message": {
"type": "string",
"example": "Any message"
},
"object": {
"type": "object",
"additionalProperties": true
},
"status": {
"type": "integer",
"example": 200
Expand Down
Loading

0 comments on commit a816773

Please sign in to comment.