sera-2 1.12.1__py3-none-any.whl → 1.12.3__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.
@@ -345,7 +345,7 @@ def make_python_get_by_id_api(
345
345
  expr.ExprIdent("Session"),
346
346
  ),
347
347
  ],
348
- return_type=expr.ExprIdent(f"{cls.name}"),
348
+ return_type=expr.ExprIdent("dict"),
349
349
  is_async=True,
350
350
  )(
351
351
  stmt.SingleExprStatement(expr.ExprConstant("Retrieving record by id")),
@@ -387,12 +387,26 @@ def make_python_get_by_id_api(
387
387
  )
388
388
  ),
389
389
  lambda ast13: ast13.return_(
390
- expr.ExprFuncCall(
391
- PredefinedFn.attr_getter(
392
- expr.ExprIdent(cls.name), expr.ExprIdent("from_db")
393
- ),
394
- [expr.ExprIdent("record")],
395
- )
390
+ PredefinedFn.dict(
391
+ [
392
+ (
393
+ PredefinedFn.attr_getter(
394
+ expr.ExprIdent(cls.name), expr.ExprIdent("__name__")
395
+ ),
396
+ PredefinedFn.list(
397
+ [
398
+ expr.ExprFuncCall(
399
+ PredefinedFn.attr_getter(
400
+ expr.ExprIdent(cls.name),
401
+ expr.ExprIdent("from_db"),
402
+ ),
403
+ [expr.ExprIdent("record")],
404
+ )
405
+ ]
406
+ ),
407
+ )
408
+ ]
409
+ ),
396
410
  ),
397
411
  ),
398
412
  )
@@ -1138,7 +1138,7 @@ def make_typescript_data_model(schema: Schema, target_pkg: Package):
1138
1138
  (
1139
1139
  expr.ExprIdent("datatype"),
1140
1140
  expr.ExprConstant(
1141
- tstype.type if prop.target.db is not None else "embedded"
1141
+ tstype.type if prop.target.db is not None else "undefined"
1142
1142
  ),
1143
1143
  ),
1144
1144
  (
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: sera-2
3
- Version: 1.12.1
3
+ Version: 1.12.3
4
4
  Summary:
5
5
  Author: Binh Vu
6
6
  Author-email: bvu687@gmail.com
@@ -12,10 +12,10 @@ sera/libs/middlewares/uscp.py,sha256=H5umW8iEQSCdb_MJ5Im49kxg1E7TpxSg1p2_2A5zI1U
12
12
  sera/make/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
13
  sera/make/__main__.py,sha256=G5O7s6135-708honwqMFn2yPTs06WbGQTHpupID0eZ4,1417
14
14
  sera/make/make_app.py,sha256=n9NtW73O3s_5Q31VHIRmnd-jEIcpDO7ksAsOdovde2s,5999
15
- sera/make/make_python_api.py,sha256=kq5DClmEeeNgg-a3Bb_8GN9jxvjnhjmW3RfBHNzynO8,25407
15
+ sera/make/make_python_api.py,sha256=CM0NTcSUMgRagscvpZwrbI_PR9d4CsgZ2xUVM0rCVVg,26031
16
16
  sera/make/make_python_model.py,sha256=ldaDnuwudkq81w2hwKZIuRqFnqhxOAaIT_VhYandXG4,46128
17
17
  sera/make/make_python_services.py,sha256=RsinYZdfkrTlTn9CT50VgqGs9w6IZawsJx-KEmqfnEY,2062
18
- sera/make/make_typescript_model.py,sha256=-Z3vHblUcEpWvMMdzQGZ9XWhUjLv99PBJGqZHsF0m1o,63686
18
+ sera/make/make_typescript_model.py,sha256=ugDdSTw_1ayHLuL--92RQ8hf_D-dpJtnvmUZNxcwcDs,63687
19
19
  sera/misc/__init__.py,sha256=Dh4uDq0D4N53h3zhvmwfa5a0TPVRSUvLzb0hkFuPirk,411
20
20
  sera/misc/_formatter.py,sha256=aCGYL08l8f3aLODHxSocxBBwkRYEo3K1QzCDEn3suj0,1685
21
21
  sera/misc/_utils.py,sha256=V5g4oLGHOhUCR75Kkcn1w01pAvGvaepK-T8Z3pIgHjI,1450
@@ -32,6 +32,6 @@ sera/models/_parse.py,sha256=uw6fvvh1ucGqE2jFTCCr-e6_qMfZfSVpaPolNxmrHww,9897
32
32
  sera/models/_property.py,sha256=SJSm5fZJimd2rQuL4UH_aZuNyp9v7x64xMbEVbtYx8Q,5633
33
33
  sera/models/_schema.py,sha256=r-Gqg9Lb_wR3UrbNvfXXgt_qs5bts0t2Ve7aquuF_OI,1155
34
34
  sera/typing.py,sha256=Q4QMfbtfrCjC9tFfsZPhsAnbNX4lm4NHQ9lmjNXYdV0,772
35
- sera_2-1.12.1.dist-info/METADATA,sha256=FqHaIvKFPE4IustLBxlrq50DEg-q2XA5mhamwG6XgDI,858
36
- sera_2-1.12.1.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
37
- sera_2-1.12.1.dist-info/RECORD,,
35
+ sera_2-1.12.3.dist-info/METADATA,sha256=5KV9Z9cwjWA1UZKqo9iCrj0XRwL54xS7JmRrGAc5S7s,858
36
+ sera_2-1.12.3.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
37
+ sera_2-1.12.3.dist-info/RECORD,,