From 012fb02c826f1c2af874a6a6ce46c4bd2181bdd4 Mon Sep 17 00:00:00 2001 From: Tio Pramayudi Date: Fri, 2 Feb 2024 13:22:40 +0700 Subject: [PATCH 1/3] Add default value for protocol in version endpoint and model endpoints --- db-migrations/37_update_protocol_default.up.sql | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 db-migrations/37_update_protocol_default.up.sql diff --git a/db-migrations/37_update_protocol_default.up.sql b/db-migrations/37_update_protocol_default.up.sql new file mode 100644 index 000000000..4f97a0518 --- /dev/null +++ b/db-migrations/37_update_protocol_default.up.sql @@ -0,0 +1,12 @@ +-- Updating default protocol for version endpoints +update + version_endpoints +set protocol = 'HTTP_JSON' +where protocol is null or protocol = ''; + + +-- Updating default protocol for model endpoints +update + model_endpoints +set protocol = 'HTTP_JSON' +where protocol is null or protocol = ''; From ef8f784b761669d6c7aafdc47d3d28c22561f2cd Mon Sep 17 00:00:00 2001 From: Tio Pramayudi Date: Fri, 2 Feb 2024 13:34:31 +0700 Subject: [PATCH 2/3] Add down script that do nothing --- db-migrations/37_update_protocol_default.down.sql | 1 + 1 file changed, 1 insertion(+) create mode 100644 db-migrations/37_update_protocol_default.down.sql diff --git a/db-migrations/37_update_protocol_default.down.sql b/db-migrations/37_update_protocol_default.down.sql new file mode 100644 index 000000000..7fcc8fd5d --- /dev/null +++ b/db-migrations/37_update_protocol_default.down.sql @@ -0,0 +1 @@ +-- Do nothing \ No newline at end of file From a7814e0509f216d16e866e36660932971c70fff7 Mon Sep 17 00:00:00 2001 From: Tio Pramayudi Date: Fri, 2 Feb 2024 15:04:04 +0700 Subject: [PATCH 3/3] Relax the enum for protocol and deployment mode to accept empty string --- python/sdk/client/models/deployment_mode.py | 1 + python/sdk/client/models/protocol.py | 1 + swagger.yaml | 2 ++ 3 files changed, 4 insertions(+) diff --git a/python/sdk/client/models/deployment_mode.py b/python/sdk/client/models/deployment_mode.py index 8f506cd7e..bf59e53bf 100644 --- a/python/sdk/client/models/deployment_mode.py +++ b/python/sdk/client/models/deployment_mode.py @@ -36,6 +36,7 @@ class DeploymentMode(str, Enum): """ SERVERLESS = 'serverless' RAW_DEPLOYMENT = 'raw_deployment' + EMPTY = '' @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/python/sdk/client/models/protocol.py b/python/sdk/client/models/protocol.py index 7a60638dc..057d6d402 100644 --- a/python/sdk/client/models/protocol.py +++ b/python/sdk/client/models/protocol.py @@ -36,6 +36,7 @@ class Protocol(str, Enum): """ HTTP_JSON = 'HTTP_JSON' UPI_V1 = 'UPI_V1' + EMPTY = '' @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/swagger.yaml b/swagger.yaml index 3bf626b5a..1c0926d79 100644 --- a/swagger.yaml +++ b/swagger.yaml @@ -1844,6 +1844,7 @@ components: enum: - serverless - raw_deployment + - "" Container: type: object properties: @@ -2216,6 +2217,7 @@ components: enum: - HTTP_JSON - UPI_V1 + - "" securitySchemes: Bearer: type: apiKey