diff --git a/scripts/rest_urllib_headers.diff b/scripts/rest_urllib_headers.diff new file mode 100644 index 0000000000..5898e65b25 --- /dev/null +++ b/scripts/rest_urllib_headers.diff @@ -0,0 +1,13 @@ +diff --git a/kubernetes/client/exceptions.py b/kubernetes/client/exceptions.py +index c7c152b5..1e23d80a 100644 +--- a/kubernetes/client/exceptions.py ++++ b/kubernetes/client/exceptions.py +@@ -88,7 +88,7 @@ class ApiException(OpenApiException): + self.status = http_resp.status + self.reason = http_resp.reason + self.body = http_resp.data +- self.headers = http_resp.getheaders() ++ self.headers = http_resp.headers + else: + self.status = status + self.reason = reason diff --git a/scripts/update-client.sh b/scripts/update-client.sh index 87e00ed40c..b6f12a3cdd 100755 --- a/scripts/update-client.sh +++ b/scripts/update-client.sh @@ -78,6 +78,8 @@ git apply "${SCRIPT_ROOT}/rest_client_patch.diff" # once we upgrade to a version of swagger-codegen that includes it (version>= 6.6.0). # See https://github.com/OpenAPITools/openapi-generator/pull/15283 git apply "${SCRIPT_ROOT}/rest_sni_patch.diff" +# OpenAPI client generator prior to 6.4.0 uses deprecated urllib3 APIs. +git apply "${SCRIPT_ROOT}/rest_urllib_headers.diff" echo ">>> generating docs..." pushd "${DOC_ROOT}" > /dev/null