structurize 2.20.2__py3-none-any.whl → 2.20.4__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.
- avrotize/__init__.py +2 -0
- avrotize/_version.py +3 -3
- avrotize/avrotocsharp.py +121 -16
- avrotize/avrotots.py +2 -2
- avrotize/commands.json +168 -9
- avrotize/constants.py +15 -0
- avrotize/jsonstostructure.py +234 -12
- avrotize/openapitostructure.py +717 -0
- avrotize/structuretojs.py +657 -0
- avrotize/structuretots.py +26 -2
- {structurize-2.20.2.dist-info → structurize-2.20.4.dist-info}/METADATA +1 -1
- {structurize-2.20.2.dist-info → structurize-2.20.4.dist-info}/RECORD +16 -14
- {structurize-2.20.2.dist-info → structurize-2.20.4.dist-info}/WHEEL +0 -0
- {structurize-2.20.2.dist-info → structurize-2.20.4.dist-info}/entry_points.txt +0 -0
- {structurize-2.20.2.dist-info → structurize-2.20.4.dist-info}/licenses/LICENSE +0 -0
- {structurize-2.20.2.dist-info → structurize-2.20.4.dist-info}/top_level.txt +0 -0
avrotize/structuretots.py
CHANGED
|
@@ -608,12 +608,19 @@ class StructureToTypeScript:
|
|
|
608
608
|
f.write(index_content)
|
|
609
609
|
|
|
610
610
|
def convert(self, structure_schema_path: str, output_dir: str, package_name: str = '') -> None:
|
|
611
|
-
"""
|
|
611
|
+
""" Converts a JSON Structure schema file to TypeScript classes """
|
|
612
612
|
self.output_dir = output_dir
|
|
613
613
|
|
|
614
614
|
# Load schema
|
|
615
615
|
with open(structure_schema_path, 'r', encoding='utf-8') as f:
|
|
616
|
-
|
|
616
|
+
schema = json.load(f)
|
|
617
|
+
|
|
618
|
+
self.convert_schema(schema, output_dir, package_name)
|
|
619
|
+
|
|
620
|
+
def convert_schema(self, schema: JsonNode, output_dir: str, package_name: str = '') -> None:
|
|
621
|
+
""" Converts a JSON Structure schema to TypeScript classes """
|
|
622
|
+
self.output_dir = output_dir
|
|
623
|
+
self.schema_doc = schema
|
|
617
624
|
|
|
618
625
|
# Register schema IDs
|
|
619
626
|
self.register_schema_ids(self.schema_doc)
|
|
@@ -651,3 +658,20 @@ def convert_structure_to_typescript(structure_schema_path: str, ts_file_path: st
|
|
|
651
658
|
"""
|
|
652
659
|
converter = StructureToTypeScript(package_name, typedjson_annotation, avro_annotation)
|
|
653
660
|
converter.convert(structure_schema_path, ts_file_path, package_name)
|
|
661
|
+
|
|
662
|
+
|
|
663
|
+
def convert_structure_schema_to_typescript(structure_schema: JsonNode, output_dir: str,
|
|
664
|
+
package_name: str = '', typedjson_annotation: bool = False,
|
|
665
|
+
avro_annotation: bool = False) -> None:
|
|
666
|
+
"""
|
|
667
|
+
Converts a JSON Structure schema to TypeScript classes.
|
|
668
|
+
|
|
669
|
+
Args:
|
|
670
|
+
structure_schema: JSON Structure schema to convert
|
|
671
|
+
output_dir: Output directory for TypeScript files
|
|
672
|
+
package_name: Package name for the generated TypeScript project
|
|
673
|
+
typedjson_annotation: Whether to include TypedJSON annotations
|
|
674
|
+
avro_annotation: Whether to include Avro annotations
|
|
675
|
+
"""
|
|
676
|
+
converter = StructureToTypeScript(package_name, typedjson_annotation, avro_annotation)
|
|
677
|
+
converter.convert_schema(structure_schema, output_dir, package_name)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: structurize
|
|
3
|
-
Version: 2.20.
|
|
3
|
+
Version: 2.20.4
|
|
4
4
|
Summary: Tools to convert from and to JSON Structure from various other schema languages.
|
|
5
5
|
Author-email: Clemens Vasters <clemensv@microsoft.com>
|
|
6
6
|
Classifier: Programming Language :: Python :: 3
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
avrotize/__init__.py,sha256=
|
|
1
|
+
avrotize/__init__.py,sha256=t5h5wkHXr6M0mmHAB5rhjZ3Gxy9xutGTGIfojfao9rI,3820
|
|
2
2
|
avrotize/__main__.py,sha256=5pY8dYAURcOnFRvgb6fgaOIa_SOzPLIWbU8-ZTQ0jG4,88
|
|
3
|
-
avrotize/_version.py,sha256=
|
|
3
|
+
avrotize/_version.py,sha256=F8bZyZavhM4Xp-ZQsbVpabIxKCTg8OBN1k8cZ-LzSRk,714
|
|
4
4
|
avrotize/asn1toavro.py,sha256=QDNwfBfXMxSH-k487CA3CaGCGDzOLs4PpVbbENm5uF0,8386
|
|
5
5
|
avrotize/avrotize.py,sha256=VHFpBltMVBpyt0ju3ZWW725BKjQ4Fk-nrAy8udW-X44,5713
|
|
6
6
|
avrotize/avrotocpp.py,sha256=hRZV247_TDD7Sm6_8sFx-UH5SueLLx2Wg6TvAVUX0iE,25693
|
|
7
|
-
avrotize/avrotocsharp.py,sha256=
|
|
7
|
+
avrotize/avrotocsharp.py,sha256=k-tBex_vT-79yKZNetP9pKF63206NlT7KKBIXies9Cg,71400
|
|
8
8
|
avrotize/avrotocsv.py,sha256=PaDEW2aGRFVNLwewWhJ3OwxbKFI3PBg_mTgtT4uLMko,3689
|
|
9
9
|
avrotize/avrotodatapackage.py,sha256=zSCphLvCYiBKRAUCdccsr-4JysH3PyAS6fSgwa65Tss,7259
|
|
10
10
|
avrotize/avrotodb.py,sha256=5fNJgz00VMimyOl7eI0lIxlcaN_JnN0mb2Q9lzCRecw,46989
|
|
@@ -22,21 +22,22 @@ avrotize/avrotoparquet.py,sha256=qm5hfia5elW1Yn4KACG8bbudLAqQSwGk3fIkTvdT5Rg,908
|
|
|
22
22
|
avrotize/avrotoproto.py,sha256=STqbdGjVrgKrlKXt-6dZlekW_Oq0W0StRx80St1XqIc,22486
|
|
23
23
|
avrotize/avrotopython.py,sha256=sPsSLseSq-toKHnsFsYRRtGePGYospRz2mwGLep-POw,31147
|
|
24
24
|
avrotize/avrotorust.py,sha256=QMIBNkFpDlH44kuQo24k5D-f0lmdhoA5b7hEbhKsnMw,22214
|
|
25
|
-
avrotize/avrotots.py,sha256=
|
|
25
|
+
avrotize/avrotots.py,sha256=u_XLjlHN0Gof5QYlpqK4X9WoX9rL30TjQMPg4TiyYnI,33241
|
|
26
26
|
avrotize/avrotoxsd.py,sha256=iGQq_8kC0kfKsqvqS6s_mO-kJ8N5G8vXOwqRI_DZUxc,17744
|
|
27
27
|
avrotize/cddltostructure.py,sha256=MA2c-P3CIEAxEaBX-FF299gR55xcLEV3FrfTr2QfayM,74491
|
|
28
|
-
avrotize/commands.json,sha256=
|
|
28
|
+
avrotize/commands.json,sha256=pD9H4fyT7nG2QBj-yLZc5JW-8JQsf2mnVjQ0k-Ubc5o,92489
|
|
29
29
|
avrotize/common.py,sha256=enqNR1I9-SbW7fNJE3w7N2R87kiN6_9Oa7VB4b2AUBc,31913
|
|
30
|
-
avrotize/constants.py,sha256=
|
|
30
|
+
avrotize/constants.py,sha256=AH9ITnLsGs-izJWhlZA30ADHYjV1P7NWumyvtU3mqrg,2627
|
|
31
31
|
avrotize/csvtoavro.py,sha256=TuIYm_Xv8gioEHl1YgWQKOYkFGGHfuwmK5RuEAEXbt8,4293
|
|
32
32
|
avrotize/datapackagetoavro.py,sha256=lw1S3H6UpKtjJj9ywDTuRw-qcihFx0vFJNPK7SlgKvY,2607
|
|
33
33
|
avrotize/dependency_resolver.py,sha256=LGOTutpobJ4kMjAwvs-l0Mt2tEoZFaXCazs-u38qnYk,19374
|
|
34
34
|
avrotize/dependency_version.py,sha256=tvbpO2VstTSTmNA5jbzQl48u6jnIM7BHyASQrrgsRYU,16844
|
|
35
35
|
avrotize/jsonstoavro.py,sha256=ZzigsCjAxw_TflXCjTLKHTrPmkiZRZMpuaZICfT_r_I,120069
|
|
36
|
-
avrotize/jsonstostructure.py,sha256=
|
|
36
|
+
avrotize/jsonstostructure.py,sha256=AXqrh3gJsQveWmC9Pfj1rTcUY_4KaDP7L9ObBSQehF4,147687
|
|
37
37
|
avrotize/jstructtoavro.py,sha256=sOq7Ru1b8_ZLCEsnBqx3gsMWd7dPAaYxoraAD0bz6rk,33891
|
|
38
38
|
avrotize/kstructtoavro.py,sha256=t97JY22n0uILK3WcvQu_Yp9ONvouJRLAC2bZ3rvZ1L0,2856
|
|
39
39
|
avrotize/kustotoavro.py,sha256=1oEk9mbqmP3N5-V7mBHSXpbSlYFzjJ7ajIDNJZxA1r8,21756
|
|
40
|
+
avrotize/openapitostructure.py,sha256=b86NYHHh8L9LF6-MD7jy57Pw80bo6pez-6Ve3F36hgs,31442
|
|
40
41
|
avrotize/parquettoavro.py,sha256=iAPrSYNkiH3fBKNVDfIgeXkQbAiopa252ULJrGgmBDI,5531
|
|
41
42
|
avrotize/proto2parser.py,sha256=__9R3cqiUJXc_efPCZZcF7rt18kA7mfhmX0qm2v0eSw,19742
|
|
42
43
|
avrotize/proto3parser.py,sha256=MfE84c-oAWWuzYmKlEZ5g5LUF7YzZaASFh2trX3UCaw,15604
|
|
@@ -51,20 +52,21 @@ avrotize/structuretogo.py,sha256=VCEUz-5J8uRqX1hWaTimtfVzEsIB-gs4wxa308rYD0s,324
|
|
|
51
52
|
avrotize/structuretographql.py,sha256=wcGXnrup5v5saRa1BhR6o-X8q8ujsQMVqrFHQTBPjww,20468
|
|
52
53
|
avrotize/structuretoiceberg.py,sha256=itKb33Kj-7-udk4eHTLmTEasIeh1ggpZ3e_bwCxLABM,15344
|
|
53
54
|
avrotize/structuretojava.py,sha256=jG2Vcf1KdezWrZo5lsecxLnmnMw1rA96uOxVWJQ4Rso,43372
|
|
55
|
+
avrotize/structuretojs.py,sha256=TJuhUGqn0F2omjPVcrPeFPHY2KynRceFg9gMGvEenxA,29608
|
|
54
56
|
avrotize/structuretojsons.py,sha256=PJrQBaf6yQHu5eFkePxbjPBEmL-fYfX2wj6OmH1jsWw,22495
|
|
55
57
|
avrotize/structuretokusto.py,sha256=rOKgYIcm7ZK8RS-VvMFPNzPzwtv7c4dIKU-fKjrJLyM,30618
|
|
56
58
|
avrotize/structuretomd.py,sha256=exfCldYbieVdduhotSoLrxsbphmyJQyeQso9qv4qyUw,13642
|
|
57
59
|
avrotize/structuretoproto.py,sha256=Aq0-fwMXSjjAxgZ5mq1kpo_TauigMRrJK9LNyoN-YGs,42679
|
|
58
60
|
avrotize/structuretopython.py,sha256=ePlXrwbqA9r63Vw6xL-Gq3hBUScdcF9aqCQSi_xtaGo,37980
|
|
59
61
|
avrotize/structuretorust.py,sha256=ChRmO7uzU-pMdDdS0Vtg-MVUaOaNhNUPwH-ZKKOHglU,35134
|
|
60
|
-
avrotize/structuretots.py,sha256=
|
|
62
|
+
avrotize/structuretots.py,sha256=y58jzClvVzudZurquW9nLIxvCXNvoYhiDycurpS4wlc,31990
|
|
61
63
|
avrotize/structuretoxsd.py,sha256=01VpasyWSMOx04sILHLP7H-WkhGdXAEGKohUUfgrNf0,32797
|
|
62
64
|
avrotize/xsdtoavro.py,sha256=nQtNH_3pEZBp67oUCPqzhvItEExHTe-8obsIfNRXt8Y,19064
|
|
63
65
|
avrotize/dependencies/cpp/vcpkg/vcpkg.json,sha256=se5qnUVQ1Q6wN_DqgIioqKg_y7ouh9oly2iBAJJXkgw,414
|
|
64
66
|
avrotize/dependencies/typescript/node22/package.json,sha256=oAW_2X-b715kV7aajwuONZEMkyQUJGviG3GwnoUa7hU,387
|
|
65
|
-
structurize-2.20.
|
|
66
|
-
structurize-2.20.
|
|
67
|
-
structurize-2.20.
|
|
68
|
-
structurize-2.20.
|
|
69
|
-
structurize-2.20.
|
|
70
|
-
structurize-2.20.
|
|
67
|
+
structurize-2.20.4.dist-info/licenses/LICENSE,sha256=xGtQGygTETTtDQJafZCUbpsed3GxO6grmqig-jGEuSk,11348
|
|
68
|
+
structurize-2.20.4.dist-info/METADATA,sha256=bfm0YeV3NUsQ0eNGyrGVWZPfMFJh3fUunrdoMGIdTuQ,3670
|
|
69
|
+
structurize-2.20.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
70
|
+
structurize-2.20.4.dist-info/entry_points.txt,sha256=biIH7jA5auhVqfbwHVk2gmD_gvrPYKgjpCAn0JWZ-Rs,55
|
|
71
|
+
structurize-2.20.4.dist-info/top_level.txt,sha256=yn-yQ0Cm1O9fbF8KJgv4IIvX4YRGelKgPqZF1wS5P50,9
|
|
72
|
+
structurize-2.20.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|