CheeseAPI 2.0.2__tar.gz → 2.0.2b1__tar.gz

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.
@@ -26,31 +26,31 @@ def validator(*, json_model: pydantic.BaseModel | None = None, form_model: pydan
26
26
 
27
27
  json_data = None
28
28
  if json_model is not None:
29
- json_data = json_model.model_validate(request.json, by_alias = True)
29
+ json_data = json_model.model_validate(request.json or {}, by_alias = True)
30
30
  if kwargs.get('json_data') is None:
31
31
  kwargs['json_data'] = json_data
32
32
 
33
33
  form_data = None
34
34
  if form_model is not None:
35
- form_data = form_model.model_validate(request.form, by_alias = True)
35
+ form_data = form_model.model_validate(request.form or {}, by_alias = True)
36
36
  if kwargs.get('form_data') is None:
37
37
  kwargs['form_data'] = form_data
38
38
 
39
39
  params_data = None
40
40
  if params_model is not None:
41
- params_data = params_model.model_validate(request.params, by_alias = True)
41
+ params_data = params_model.model_validate(request.params or {}, by_alias = True)
42
42
  if kwargs.get('params_data') is None:
43
43
  kwargs['params_data'] = params_data
44
44
 
45
45
  headers_data = None
46
46
  if headers_model is not None:
47
- headers_data = headers_model.model_validate(request.headers, by_alias = True)
47
+ headers_data = headers_model.model_validate(request.headers or {}, by_alias = True)
48
48
  if kwargs.get('headers_data') is None:
49
49
  kwargs['headers_data'] = headers_data
50
50
 
51
51
  query_data = None
52
52
  if query_model is not None:
53
- query_data = query_model.model_validate(request.query, by_alias = True)
53
+ query_data = query_model.model_validate(request.query or {}, by_alias = True)
54
54
  if kwargs.get('query_data') is None:
55
55
  kwargs['query_data'] = query_data
56
56
  except Exception as e:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: CheeseAPI
3
- Version: 2.0.2
3
+ Version: 2.0.2b1
4
4
  Summary: 一款web协程框架
5
5
  Project-URL: Source, https://github.com/CheeseUnknown/CheeseAPI
6
6
  Author-email: Cheese Unknown <cheese@cheese.ren>
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "CheeseAPI"
7
- version = "2.0.2"
7
+ version = "2.0.2-beta.1"
8
8
  description = "一款web协程框架"
9
9
  readme = "README.md"
10
10
  license-files = { paths = [ "LICENSE" ] }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes