Skip to content

Commit 12c05dc

Browse files
box-sdk-buildbox-sdk-build
andauthored
feat: Treat nullable fields as Optional (box/box-codegen#906) (#1256)
Co-authored-by: box-sdk-build <box-sdk-build@box.com>
1 parent dcfc504 commit 12c05dc

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

.codegen.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{ "engineHash": "576c827", "specHash": "1e0848d", "version": "10.2.0" }
1+
{ "engineHash": "de55410", "specHash": "1e0848d", "version": "10.2.0" }

box_sdk_gen/schemas/sign_request_signer_input_custom_validation.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
from enum import Enum
22

3+
from typing import Optional
4+
35
from box_sdk_gen.internal.base_object import BaseObject
46

57
from box_sdk_gen.box.errors import BoxSDKError
@@ -12,22 +14,22 @@ class SignRequestSignerInputCustomValidationValidationTypeField(str, Enum):
1214
class SignRequestSignerInputCustomValidation(BaseObject):
1315
def __init__(
1416
self,
15-
custom_regex: str,
16-
custom_error_message: str,
1717
*,
1818
validation_type: SignRequestSignerInputCustomValidationValidationTypeField = SignRequestSignerInputCustomValidationValidationTypeField.CUSTOM,
19+
custom_regex: Optional[str] = None,
20+
custom_error_message: Optional[str] = None,
1921
**kwargs
2022
):
2123
"""
22-
:param custom_regex: Regular expression used for validation.
23-
:type custom_regex: str
24-
:param custom_error_message: Error message shown if input fails custom regular expression validation.
25-
:type custom_error_message: str
2624
:param validation_type: Defines the validation format for the text input as custom.
2725
A custom regular expression is used for validation., defaults to SignRequestSignerInputCustomValidationValidationTypeField.CUSTOM
2826
:type validation_type: SignRequestSignerInputCustomValidationValidationTypeField, optional
27+
:param custom_regex: Regular expression used for validation., defaults to None
28+
:type custom_regex: Optional[str], optional
29+
:param custom_error_message: Error message shown if input fails custom regular expression validation., defaults to None
30+
:type custom_error_message: Optional[str], optional
2931
"""
3032
super().__init__(**kwargs)
33+
self.validation_type = validation_type
3134
self.custom_regex = custom_regex
3235
self.custom_error_message = custom_error_message
33-
self.validation_type = validation_type

0 commit comments

Comments
 (0)