From b85b2ec056c4f7d8cade09fccbdecb7f709a8733 Mon Sep 17 00:00:00 2001 From: Xiaoyan Rao <270668624@qq.com> Date: Fri, 26 Aug 2022 16:51:27 +0800 Subject: [PATCH] fix(auto-doc) change targets healthy/unhealthy endpoints http method `POST` to `PUT` (#9262) --- autodoc/admin-api/data/admin-api.lua | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/autodoc/admin-api/data/admin-api.lua b/autodoc/admin-api/data/admin-api.lua index b61e7e1e04a5..dcedccc5b9d4 100644 --- a/autodoc/admin-api/data/admin-api.lua +++ b/autodoc/admin-api/data/admin-api.lua @@ -1844,7 +1844,7 @@ return { } }, ["/upstreams/:upstreams/targets/:targets/healthy"] = { - POST = { + PUT = { title = [[Set target as healthy]], description = [[ Set the current health status of a target in the load balancer to "healthy" @@ -1863,7 +1863,7 @@ return { Note: This API is not available when Kong is running in Hybrid mode. ]], endpoint = [[ -
/upstreams/{upstream name or id}/targets/{target or id}/healthy
+
/upstreams/{upstream name or id}/targets/{target or id}/healthy
{:.indent} Attributes | Description @@ -1879,7 +1879,7 @@ return { } }, ["/upstreams/:upstreams/targets/:targets/unhealthy"] = { - POST = { + PUT = { title = [[Set target as unhealthy]], description = [[ Set the current health status of a target in the load balancer to "unhealthy" @@ -1903,7 +1903,7 @@ return { Note: This API is not available when Kong is running in Hybrid mode. ]], endpoint = [[ -
/upstreams/{upstream name or id}/targets/{target or id}/unhealthy
+
/upstreams/{upstream name or id}/targets/{target or id}/unhealthy
{:.indent} Attributes | Description @@ -1919,7 +1919,7 @@ return { } }, ["/upstreams/:upstreams/targets/:targets/:address/healthy"] = { - POST = { + PUT = { title = [[Set target address as healthy]], description = [[ Set the current health status of an individual address resolved by a target @@ -1937,7 +1937,7 @@ return { Note: This API is not available when Kong is running in Hybrid mode. ]], endpoint = [[ -
/upstreams/{upstream name or id}/targets/{target or id}/{address}/healthy
+
/upstreams/{upstream name or id}/targets/{target or id}/{address}/healthy
{:.indent} Attributes | Description @@ -1954,7 +1954,7 @@ return { } }, ["/upstreams/:upstreams/targets/:targets/:address/unhealthy"] = { - POST = { + PUT = { title = [[Set target address as unhealthy]], description = [[ Set the current health status of an individual address resolved by a target @@ -1977,7 +1977,7 @@ return { Note: This API is not available when Kong is running in Hybrid mode. ]], endpoint = [[ -
/upstreams/{upstream name or id}/targets/{target or id}/unhealthy
+
/upstreams/{upstream name or id}/targets/{target or id}/unhealthy
{:.indent} Attributes | Description @@ -2381,10 +2381,10 @@ return { ["DELETE"] = false, -- exceptions for the healthcheck endpoints: ["/upstreams/:upstreams/targets/:targets/healthy"] = { - ["POST"] = true, + ["PUT"] = true, }, ["/upstreams/:upstreams/targets/:targets/unhealthy"] = { - ["POST"] = true, + ["PUT"] = true, }, },