Skip to content

Commit 0fccf80

Browse files
committed
Update mode to latest openapi definitions
1 parent 991df51 commit 0fccf80

File tree

8 files changed

+50
-19
lines changed

8 files changed

+50
-19
lines changed

.openapi-generator-ignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ test/
44
.travis.yml
55
git_push.sh
66
test-requirements.txt
7+
requirements.txt
78
tox.ini
89
setup.cfg
910
README.md
1011
.gitignore
12+
setup.py
1113

1214
regula/documentreader/webclient/gen/models/container_list.py

Pipfile.lock

100644100755
File mode changed.

example/Pipfile

100644100755
File mode changed.

example/Pipfile.lock

100644100755
File mode changed.

example/example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
doc_number_mrz_visual_matching = doc_number_field.get_comparison(Source.MRZ, Source.VISUAL)
3535

3636
response_status = response.status
37-
doc_overall_status = "valid" if response_status.complete == CheckResult.OK else "not valid"
37+
doc_overall_status = "valid" if response_status.overall_status == CheckResult.OK else "not valid"
3838

3939
response_images = response.images
4040

generator-templates/api_client.mustache

100644100755
File mode changed.

regula/documentreader/webclient/gen/models/status.py

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class Status(object):
3333
and the value is json key in definition.
3434
"""
3535
openapi_types = {
36-
'complete': 'CheckResult',
36+
'overall_status': 'CheckResult',
3737
'optical': 'CheckResult',
3838
'portrait': 'CheckResult',
3939
'rfid': 'CheckResult',
@@ -43,7 +43,7 @@ class Status(object):
4343
}
4444

4545
attribute_map = {
46-
'complete': 'complete',
46+
'overall_status': 'overallStatus',
4747
'optical': 'optical',
4848
'portrait': 'portrait',
4949
'rfid': 'rfid',
@@ -52,13 +52,13 @@ class Status(object):
5252
'details_optical': 'detailsOptical'
5353
}
5454

55-
def __init__(self, complete=None, optical=None, portrait=None, rfid=None, stop_list=None, details_rfid=None, details_optical=None, local_vars_configuration=None): # noqa: E501
55+
def __init__(self, overall_status=None, optical=None, portrait=None, rfid=None, stop_list=None, details_rfid=None, details_optical=None, local_vars_configuration=None): # noqa: E501
5656
"""Status - a model defined in OpenAPI""" # noqa: E501
5757
if local_vars_configuration is None:
5858
local_vars_configuration = Configuration()
5959
self.local_vars_configuration = local_vars_configuration
6060

61-
self._complete = None
61+
self._overall_status = None
6262
self._optical = None
6363
self._portrait = None
6464
self._rfid = None
@@ -67,7 +67,7 @@ def __init__(self, complete=None, optical=None, portrait=None, rfid=None, stop_l
6767
self._details_optical = None
6868
self.discriminator = None
6969

70-
self.complete = complete
70+
self.overall_status = overall_status
7171
self.optical = optical
7272
if portrait is not None:
7373
self.portrait = portrait
@@ -80,27 +80,27 @@ def __init__(self, complete=None, optical=None, portrait=None, rfid=None, stop_l
8080
self.details_optical = details_optical
8181

8282
@property
83-
def complete(self):
84-
"""Gets the complete of this Status. # noqa: E501
83+
def overall_status(self):
84+
"""Gets the overall_status of this Status. # noqa: E501
8585
8686
87-
:return: The complete of this Status. # noqa: E501
87+
:return: The overall_status of this Status. # noqa: E501
8888
:rtype: CheckResult
8989
"""
90-
return self._complete
90+
return self._overall_status
9191

92-
@complete.setter
93-
def complete(self, complete):
94-
"""Sets the complete of this Status.
92+
@overall_status.setter
93+
def overall_status(self, overall_status):
94+
"""Sets the overall_status of this Status.
9595
9696
97-
:param complete: The complete of this Status. # noqa: E501
98-
:type complete: CheckResult
97+
:param overall_status: The overall_status of this Status. # noqa: E501
98+
:type overall_status: CheckResult
9999
"""
100-
if self.local_vars_configuration.client_side_validation and complete is None: # noqa: E501
101-
raise ValueError("Invalid value for `complete`, must not be `None`") # noqa: E501
100+
if self.local_vars_configuration.client_side_validation and overall_status is None: # noqa: E501
101+
raise ValueError("Invalid value for `overall_status`, must not be `None`") # noqa: E501
102102

103-
self._complete = complete
103+
self._overall_status = overall_status
104104

105105
@property
106106
def optical(self):

regula/documentreader/webclient/gen/models/text_field.py

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ class TextField(object):
3838
'status': 'CheckResult',
3939
'validity_status': 'CheckResult',
4040
'comparison_status': 'CheckResult',
41+
'value': 'str',
4142
'value_list': 'list[TextFieldValue]',
4243
'validity_list': 'list[SourceValidity]',
4344
'comparison_list': 'list[CrossSourceValueComparison]'
@@ -49,12 +50,13 @@ class TextField(object):
4950
'status': 'status',
5051
'validity_status': 'validityStatus',
5152
'comparison_status': 'comparisonStatus',
53+
'value': 'value',
5254
'value_list': 'valueList',
5355
'validity_list': 'validityList',
5456
'comparison_list': 'comparisonList'
5557
}
5658

57-
def __init__(self, field_type=None, lcid=None, status=None, validity_status=None, comparison_status=None, value_list=None, validity_list=None, comparison_list=None, local_vars_configuration=None): # noqa: E501
59+
def __init__(self, field_type=None, lcid=None, status=None, validity_status=None, comparison_status=None, value=None, value_list=None, validity_list=None, comparison_list=None, local_vars_configuration=None): # noqa: E501
5860
"""TextField - a model defined in OpenAPI""" # noqa: E501
5961
if local_vars_configuration is None:
6062
local_vars_configuration = Configuration()
@@ -65,6 +67,7 @@ def __init__(self, field_type=None, lcid=None, status=None, validity_status=None
6567
self._status = None
6668
self._validity_status = None
6769
self._comparison_status = None
70+
self._value = None
6871
self._value_list = None
6972
self._validity_list = None
7073
self._comparison_list = None
@@ -76,6 +79,7 @@ def __init__(self, field_type=None, lcid=None, status=None, validity_status=None
7679
self.status = status
7780
self.validity_status = validity_status
7881
self.comparison_status = comparison_status
82+
self.value = value
7983
self.value_list = value_list
8084
self.validity_list = validity_list
8185
self.comparison_list = comparison_list
@@ -193,6 +197,31 @@ def comparison_status(self, comparison_status):
193197

194198
self._comparison_status = comparison_status
195199

200+
@property
201+
def value(self):
202+
"""Gets the value of this TextField. # noqa: E501
203+
204+
The most confidence value, selected from valueList # noqa: E501
205+
206+
:return: The value of this TextField. # noqa: E501
207+
:rtype: str
208+
"""
209+
return self._value
210+
211+
@value.setter
212+
def value(self, value):
213+
"""Sets the value of this TextField.
214+
215+
The most confidence value, selected from valueList # noqa: E501
216+
217+
:param value: The value of this TextField. # noqa: E501
218+
:type value: str
219+
"""
220+
if self.local_vars_configuration.client_side_validation and value is None: # noqa: E501
221+
raise ValueError("Invalid value for `value`, must not be `None`") # noqa: E501
222+
223+
self._value = value
224+
196225
@property
197226
def value_list(self):
198227
"""Gets the value_list of this TextField. # noqa: E501

0 commit comments

Comments
 (0)