starmallow 0.6.0__py3-none-any.whl → 0.6.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
starmallow/__init__.py CHANGED
@@ -1,4 +1,4 @@
1
- __version__ = "0.6.0"
1
+ __version__ = "0.6.1"
2
2
 
3
3
  from .applications import StarMallow
4
4
  from .exceptions import RequestValidationError
@@ -93,12 +93,10 @@ def request_params_to_args(
93
93
  load_params = received_params if ignore_namespace else received_params.get(alias, {})
94
94
 
95
95
  # Entire model is optional and no data was passed in.
96
- # if getattr(param.model, 'required') is False and not load_params:
97
- # values[field_name] = None
98
- # else:
99
- # NOTE: If schema is not required, but there are some params defined then we will try to load
100
- # This is because multiple schemas/fields may be defined per ParamType.
101
- values[field_name] = param.model.load(load_params, unknown=ma.EXCLUDE)
96
+ if getattr(param.model, 'required', None) is False and not load_params:
97
+ values[field_name] = None
98
+ else:
99
+ values[field_name] = param.model.load(load_params, unknown=ma.EXCLUDE)
102
100
 
103
101
  except ma.ValidationError as error:
104
102
  # Entire model is optional, so ignore errors
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: starmallow
3
- Version: 0.6.0
3
+ Version: 0.6.1
4
4
  Summary: StarMallow framework
5
5
  Project-URL: Homepage, https://github.com/mvanderlee/starmallow
6
6
  Author-email: Michiel Vanderlee <jmt.vanderlee@gmail.com>
@@ -1,4 +1,4 @@
1
- starmallow/__init__.py,sha256=HQAGoExawiWadHBvjDtczQGIc9vyqmGXuE4ddzl_lBs,322
1
+ starmallow/__init__.py,sha256=DlB_5whNjhGyK9ZsUBi33R-sEwMl7EMsUsUJtXcI0F4,322
2
2
  starmallow/applications.py,sha256=mSL4YDozP8n6v22g4NX7EAMXmGhzzhtjtZd68YHcFvw,31720
3
3
  starmallow/concurrency.py,sha256=MVRjo4Vqss_yqhaoeVt3xb7rLaSuAq_q9uYgTwbsojE,1375
4
4
  starmallow/constants.py,sha256=u0h8cJKhJY0oIZqzr7wpEZG2bPLrw5FroMnn3d8KBNQ,129
@@ -13,7 +13,7 @@ starmallow/exception_handlers.py,sha256=gr2qLYWEtsIEH28n7OreEiiLVz6Y7b6osRyS9esJ
13
13
  starmallow/exceptions.py,sha256=vabtPJkTmtCdC8_2OPBE8Osz0v0KxaSOX6IWf1jgNkc,872
14
14
  starmallow/fields.py,sha256=arrTabCYoJFZcoY69EZTBH3YUg7CUSr3-zYLiAjYLTM,1238
15
15
  starmallow/params.py,sha256=MJzUzUs6GEyrbpDZ1r8To8vR-QwpopdxDStq802o5Ug,8662
16
- starmallow/request_resolver.py,sha256=5UpdK6NkT7jxTjw1XtSsyXgqfiQHmVBcMQdr0ycmego,11214
16
+ starmallow/request_resolver.py,sha256=JoCxqdDYyniwNsI6FeeYKB7Muj9xDQ8LEA2ICba8n24,11012
17
17
  starmallow/requests.py,sha256=o_yNhH9WJ35uAGuoXa5_gihevHeaveOvkP525dbwQSU,843
18
18
  starmallow/responses.py,sha256=k2pf_m21ykf_FECdODUz400pMucMJJf_Zm8TXFujvaU,2012
19
19
  starmallow/routing.py,sha256=Uxnlkl4eIs56TZ8VAgNmlh-K89ku1Xu_ROR5S8x-rkg,45128
@@ -34,7 +34,7 @@ starmallow/security/http.py,sha256=cpGjM1kFDq3i_bOY96kMkf4cspBUxFkkET9lTK3NA-0,6
34
34
  starmallow/security/oauth2.py,sha256=1nv1580PY4cwgu5gzpQCf2MfMNv2Cfv05753AUHPOhQ,10005
35
35
  starmallow/security/open_id_connect_url.py,sha256=IPsL2YzWc2mPwJbrUn6oFRTi7uRAG6mR62CGwmzBs1k,1399
36
36
  starmallow/security/utils.py,sha256=bd8T0YM7UQD5ATKucr1bNtAvz_Y3__dVNAv5UebiPvc,293
37
- starmallow-0.6.0.dist-info/METADATA,sha256=JLW2qKd2rbIU1kE7FHp2NoOeYDTckYEPR3tKGiRv-k0,5651
38
- starmallow-0.6.0.dist-info/WHEEL,sha256=y1bSCq4r5i4nMmpXeUJMqs3ipKvkZObrIXSvJHm1qCI,87
39
- starmallow-0.6.0.dist-info/licenses/LICENSE.md,sha256=QelyGgOzch8CXzy6HrYwHh7nmj0rlWkDA0YzmZ3CPaY,1084
40
- starmallow-0.6.0.dist-info/RECORD,,
37
+ starmallow-0.6.1.dist-info/METADATA,sha256=T_VIdPAgpTXGjVr4xDLPhpe-XW5tPlUa8su81s22lyw,5651
38
+ starmallow-0.6.1.dist-info/WHEEL,sha256=y1bSCq4r5i4nMmpXeUJMqs3ipKvkZObrIXSvJHm1qCI,87
39
+ starmallow-0.6.1.dist-info/licenses/LICENSE.md,sha256=QelyGgOzch8CXzy6HrYwHh7nmj0rlWkDA0YzmZ3CPaY,1084
40
+ starmallow-0.6.1.dist-info/RECORD,,