Skip to content

Commit 885ee5d

Browse files
committed
Ignore validations
1 parent c1688f6 commit 885ee5d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pinecone/openapi_support/model_utils.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,10 @@ def set_attribute(self, name, value):
151151
# when listing indexes due to validation on the status field against
152152
# the allowed values in the enum.
153153
check_allowed_values(self.allowed_values, (name,), value)
154-
if (name,) in self.validations:
154+
if (name,) in self.validations and self._enforce_validations:
155+
# Disabling validation on response makes the SDK
156+
# less fragile if unexpected values are returned. In general,
157+
# we want the SDK to display whatever is returned by the API.
155158
check_validations(self.validations, (name,), value, self._configuration)
156159
self.__dict__["_data_store"][name] = value
157160

0 commit comments

Comments
 (0)