sera-2 1.6.6__py3-none-any.whl → 1.7.0__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.
@@ -821,6 +821,8 @@ def make_typescript_data_model(schema: Schema, target_pkg: Package):
|
|
821
821
|
PredefinedFn.dict(
|
822
822
|
[
|
823
823
|
(expr.ExprIdent("name"), expr.ExprConstant(prop.name)),
|
824
|
+
(expr.ExprIdent("tsName"), expr.ExprConstant(propname)),
|
825
|
+
(expr.ExprIdent("updateFuncName"), expr.ExprConstant(f"update{to_pascal_case(prop.name)}")),
|
824
826
|
(
|
825
827
|
expr.ExprIdent("label"),
|
826
828
|
expr.ExprConstant(prop.label.to_dict()),
|
@@ -928,7 +930,7 @@ def make_typescript_data_model(schema: Schema, target_pkg: Package):
|
|
928
930
|
),
|
929
931
|
stmt.LineBreak(),
|
930
932
|
stmt.TypescriptStatement(
|
931
|
-
f"export const {cls.name}Schema: Schema<{cls.name}SchemaType> = "
|
933
|
+
f"export const {cls.name}Schema: Schema<{cls.name}SchemaType['id'], {cls.name}SchemaType['cls'], {cls.name}SchemaType['draftCls'], {cls.name}SchemaType['publicProperties'], {cls.name}SchemaType['allProperties'], {cls.name}SchemaType> = "
|
932
934
|
+ PredefinedFn.dict(
|
933
935
|
[
|
934
936
|
(
|
sera/models/_constraints.py
CHANGED
@@ -24,7 +24,7 @@ class Constraint:
|
|
24
24
|
"msgspec.Meta(min_length=3, max_length=32, pattern=r'^[a-zA-Z0-9_]+$')"
|
25
25
|
)
|
26
26
|
elif self.name == "password":
|
27
|
-
return "msgspec.Meta(min_length=8, max_length=
|
27
|
+
return "msgspec.Meta(min_length=8, max_length=40)"
|
28
28
|
|
29
29
|
raise NotImplementedError()
|
30
30
|
|
@@ -10,14 +10,14 @@ sera/make/make_app.py,sha256=n9NtW73O3s_5Q31VHIRmnd-jEIcpDO7ksAsOdovde2s,5999
|
|
10
10
|
sera/make/make_python_api.py,sha256=RuJUm9z-4plBEtjobeOPr12o27OT-0tSeXI4ZlM3IY0,29433
|
11
11
|
sera/make/make_python_model.py,sha256=xf4revAwVWEnF6QhxbbqPyUGgXOOB--Gu3jPxsESg0Y,36593
|
12
12
|
sera/make/make_python_services.py,sha256=RsinYZdfkrTlTn9CT50VgqGs9w6IZawsJx-KEmqfnEY,2062
|
13
|
-
sera/make/make_typescript_model.py,sha256=
|
13
|
+
sera/make/make_typescript_model.py,sha256=k69A0AtifoyO9zOaIZFInGSdBETuqpApggTdLiihFo0,43231
|
14
14
|
sera/misc/__init__.py,sha256=Dh4uDq0D4N53h3zhvmwfa5a0TPVRSUvLzb0hkFuPirk,411
|
15
15
|
sera/misc/_formatter.py,sha256=aCGYL08l8f3aLODHxSocxBBwkRYEo3K1QzCDEn3suj0,1685
|
16
16
|
sera/misc/_utils.py,sha256=V5g4oLGHOhUCR75Kkcn1w01pAvGvaepK-T8Z3pIgHjI,1450
|
17
17
|
sera/models/__init__.py,sha256=vJC5Kzo_N7wd16ocNPy1VvAZDGNiWeiAhWJ4ihATKvA,780
|
18
18
|
sera/models/_class.py,sha256=Wf0e8x6-szG9TzoFkAlqj7_dG0SCICMBw_333n3paxk,2514
|
19
19
|
sera/models/_collection.py,sha256=ZnQEriKC4X88Zz48Kn1AVZKH-1_l8OgWa-zf2kcQOOE,1414
|
20
|
-
sera/models/_constraints.py,sha256=
|
20
|
+
sera/models/_constraints.py,sha256=L6QwKL3hRJ5DvvIB4JNgLoyvTKbE9FrpYRzezM4CweE,1484
|
21
21
|
sera/models/_datatype.py,sha256=uMxK_8wBLowaIMIAYCb3V17YmkzJrKKc5orjImzqWbA,5818
|
22
22
|
sera/models/_default.py,sha256=ABggW6qdPR4ZDqIPJdJ0GCGQ-7kfsfZmQ_DchgZEa-I,137
|
23
23
|
sera/models/_enum.py,sha256=sy0q7E646F-APsqrVQ52r1fAQ_DCAeaNq5YM5QN3zIk,2070
|
@@ -27,6 +27,6 @@ sera/models/_parse.py,sha256=sJYfQtwek96ltpgxExG4xUbiLnU3qvNYhTP1CeyXGjs,9746
|
|
27
27
|
sera/models/_property.py,sha256=CmEmgOShtSyNFq05YW3tGupwCIVRzPMKudXWld8utPk,5530
|
28
28
|
sera/models/_schema.py,sha256=r-Gqg9Lb_wR3UrbNvfXXgt_qs5bts0t2Ve7aquuF_OI,1155
|
29
29
|
sera/typing.py,sha256=Q4QMfbtfrCjC9tFfsZPhsAnbNX4lm4NHQ9lmjNXYdV0,772
|
30
|
-
sera_2-1.
|
31
|
-
sera_2-1.
|
32
|
-
sera_2-1.
|
30
|
+
sera_2-1.7.0.dist-info/METADATA,sha256=vRXwLTHQXWHB9gV7jz5kJOtM0HPfhRrTlkPcS3rO1Gw,856
|
31
|
+
sera_2-1.7.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
32
|
+
sera_2-1.7.0.dist-info/RECORD,,
|