File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
packages/models-library/src/models_library/api_schemas_webserver Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change 1313
1414MIN_NON_WILDCARD_CHARS : Final [int ] = 3
1515
16+
1617class StorageLocationPathParams (BaseModel ):
1718 location_id : LocationID
1819
@@ -49,16 +50,16 @@ def validate_pattern_has_enough_characters(v: str) -> str:
4950 non_wildcard_chars = len ([c for c in v if c not in ("*" , "?" )])
5051
5152 if non_wildcard_chars < MIN_NON_WILDCARD_CHARS :
52- msg = f"Name pattern must contain at least { MIN_NON_WILDCARD_CHARS } non-wildcard characters (not * or ?), got { non_wildcard_chars } "
53+ msg = f"Name pattern { v } must contain at least { MIN_NON_WILDCARD_CHARS } non-wildcard characters (not * or ?), got { non_wildcard_chars } "
5354 raise ValueError (msg )
5455 return v
5556
5657
5758class SearchBodyParams (InputSchema ):
5859 name_pattern : Annotated [
59- str ,
60- BeforeValidator (validate_pattern_has_enough_characters ),
61- Field (
62- description = "Name pattern with wildcard support (* and ?). Minimum of {MIN_NON_WILDCARD_CHARS} non-wildcard characters required." ,
63- )
60+ str ,
61+ BeforeValidator (validate_pattern_has_enough_characters ),
62+ Field (
63+ description = "Name pattern with wildcard support (* and ?). Minimum of {MIN_NON_WILDCARD_CHARS} non-wildcard characters required." ,
64+ ),
6465 ]
You can’t perform that action at this time.
0 commit comments