Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -271,3 +271,4 @@ samples/openapi3/client/petstore/go/privatekey.pem

## OCaml
samples/client/petstore/ocaml/_build/
.mvn/.develocity/
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,22 @@
# check_allowed_values=false
# Type validation will still be enforced regardless of this setting
skip_validation = os.environ.get("check_allowed_values", "True").lower() in ("false")

# Skip pattern/regex validation for read-only properties since they are
# server-provided values and should not be validated client-side.
# This fixes issues where server returns data that doesn't match restrictive
# patterns defined in the OpenAPI spec (e.g., cluster names with dots).
is_read_only = hasattr(self, 'read_only_vars') and name in self.read_only_vars

if not skip_validation:
if (name,) in self.allowed_values:
check_allowed_values(
self.allowed_values,
(name,),
value
)
if (name,) in self.validations:
# Skip regex/pattern validation for read-only properties
if (name,) in self.validations and not is_read_only:
check_validations(
self.validations,
(name,),
Expand Down