avrotize 2.22.2__tar.gz → 3.0.1__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.
Files changed (170) hide show
  1. {avrotize-2.22.2 → avrotize-3.0.1}/PKG-INFO +71 -14
  2. {avrotize-2.22.2 → avrotize-3.0.1}/README.md +70 -13
  3. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/_version.py +3 -3
  4. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/avrotocsv.py +16 -0
  5. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/avrotodb.py +4 -1
  6. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/avrotogo.py +4 -4
  7. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/commands.json +182 -4
  8. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/structuretots.py +1 -1
  9. {avrotize-2.22.2 → avrotize-3.0.1}/LICENSE +0 -0
  10. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/__init__.py +0 -0
  11. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/__main__.py +0 -0
  12. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/asn1toavro.py +0 -0
  13. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/avrotize.py +0 -0
  14. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/avrotocpp/CMakeLists.txt.jinja +0 -0
  15. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/avrotocpp/build.bat.jinja +0 -0
  16. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/avrotocpp/build.sh.jinja +0 -0
  17. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/avrotocpp/dataclass_body.jinja +0 -0
  18. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/avrotocpp/vcpkg.json.jinja +0 -0
  19. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/avrotocpp.py +0 -0
  20. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/avrotocsharp/README.md.jinja +0 -0
  21. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/avrotocsharp/class_test.cs.jinja +0 -0
  22. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/avrotocsharp/dataclass_core.jinja +0 -0
  23. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/avrotocsharp/enum_test.cs.jinja +0 -0
  24. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/avrotocsharp/project.csproj.jinja +0 -0
  25. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/avrotocsharp/project.sln.jinja +0 -0
  26. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/avrotocsharp/run_coverage.ps1.jinja +0 -0
  27. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/avrotocsharp/run_coverage.sh.jinja +0 -0
  28. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/avrotocsharp/testproject.csproj.jinja +0 -0
  29. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/avrotocsharp.py +0 -0
  30. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/avrotodatapackage.py +0 -0
  31. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/avrotogo/go_enum.jinja +0 -0
  32. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/avrotogo/go_helpers.jinja +0 -0
  33. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/avrotogo/go_struct.jinja +0 -0
  34. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/avrotogo/go_test.jinja +0 -0
  35. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/avrotogo/go_union.jinja +0 -0
  36. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/avrotographql.py +0 -0
  37. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/avrotoiceberg.py +0 -0
  38. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/avrotojava/class_test.java.jinja +0 -0
  39. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/avrotojava/enum_test.java.jinja +0 -0
  40. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/avrotojava/testproject.pom.jinja +0 -0
  41. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/avrotojava.py +0 -0
  42. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/avrotojs.py +0 -0
  43. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/avrotojsons.py +0 -0
  44. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/avrotojstruct.py +0 -0
  45. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/avrotokusto.py +0 -0
  46. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/avrotomd/README.md.jinja +0 -0
  47. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/avrotomd.py +0 -0
  48. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/avrotools.py +0 -0
  49. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/avrotoparquet.py +0 -0
  50. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/avrotoproto.py +0 -0
  51. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/avrotopython/dataclass_core.jinja +0 -0
  52. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/avrotopython/enum_core.jinja +0 -0
  53. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/avrotopython/pyproject_toml.jinja +0 -0
  54. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/avrotopython/test_class.jinja +0 -0
  55. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/avrotopython/test_enum.jinja +0 -0
  56. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/avrotopython.py +0 -0
  57. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/avrotorust/dataclass_enum.rs.jinja +0 -0
  58. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/avrotorust/dataclass_struct.rs.jinja +0 -0
  59. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/avrotorust/dataclass_union.rs.jinja +0 -0
  60. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/avrotorust.py +0 -0
  61. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/avrotots/class_core.ts.jinja +0 -0
  62. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/avrotots/class_test.ts.jinja +0 -0
  63. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/avrotots/enum_core.ts.jinja +0 -0
  64. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/avrotots/gitignore.jinja +0 -0
  65. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/avrotots/index.ts.jinja +0 -0
  66. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/avrotots/package.json.jinja +0 -0
  67. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/avrotots/tsconfig.json.jinja +0 -0
  68. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/avrotots.py +0 -0
  69. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/avrotoxsd.py +0 -0
  70. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/cddltostructure.py +0 -0
  71. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/common.py +0 -0
  72. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/constants.py +0 -0
  73. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/csvtoavro.py +0 -0
  74. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/datapackagetoavro.py +0 -0
  75. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/dependencies/cpp/vcpkg/vcpkg.json +0 -0
  76. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/dependencies/cs/net90/dependencies.csproj +0 -0
  77. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/dependencies/go/go121/go.mod +0 -0
  78. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/dependencies/java/jdk21/pom.xml +0 -0
  79. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/dependencies/python/py312/requirements.txt +0 -0
  80. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/dependencies/rust/stable/Cargo.toml +0 -0
  81. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/dependencies/typescript/node22/package.json +0 -0
  82. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/dependency_resolver.py +0 -0
  83. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/dependency_version.py +0 -0
  84. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/generic/generic.avsc +0 -0
  85. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/jsonstoavro.py +0 -0
  86. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/jsonstostructure.py +0 -0
  87. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/jstructtoavro.py +0 -0
  88. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/kstructtoavro.py +0 -0
  89. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/kustotoavro.py +0 -0
  90. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/openapitostructure.py +0 -0
  91. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/parquettoavro.py +0 -0
  92. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/proto2parser.py +0 -0
  93. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/proto3parser.py +0 -0
  94. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/prototoavro.py +0 -0
  95. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/prototypes/any.avsc +0 -0
  96. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/prototypes/api.avsc +0 -0
  97. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/prototypes/duration.avsc +0 -0
  98. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/prototypes/field_mask.avsc +0 -0
  99. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/prototypes/struct.avsc +0 -0
  100. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/prototypes/timestamp.avsc +0 -0
  101. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/prototypes/type.avsc +0 -0
  102. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/prototypes/wrappers.avsc +0 -0
  103. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/structuretocddl.py +0 -0
  104. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/structuretocpp/CMakeLists.txt.jinja +0 -0
  105. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/structuretocpp/build.bat.jinja +0 -0
  106. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/structuretocpp/build.sh.jinja +0 -0
  107. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/structuretocpp/dataclass_body.jinja +0 -0
  108. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/structuretocpp/vcpkg.json.jinja +0 -0
  109. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/structuretocpp.py +0 -0
  110. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/structuretocsharp/class_test.cs.jinja +0 -0
  111. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/structuretocsharp/dataclass_core.jinja +0 -0
  112. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/structuretocsharp/enum_test.cs.jinja +0 -0
  113. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/structuretocsharp/json_structure_converters.cs.jinja +0 -0
  114. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/structuretocsharp/program.cs.jinja +0 -0
  115. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/structuretocsharp/project.csproj.jinja +0 -0
  116. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/structuretocsharp/project.sln.jinja +0 -0
  117. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/structuretocsharp/testproject.csproj.jinja +0 -0
  118. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/structuretocsharp/tuple_converter.cs.jinja +0 -0
  119. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/structuretocsharp.py +0 -0
  120. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/structuretocsv.py +0 -0
  121. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/structuretodatapackage.py +0 -0
  122. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/structuretodb.py +0 -0
  123. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/structuretogo/go_enum.jinja +0 -0
  124. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/structuretogo/go_helpers.jinja +0 -0
  125. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/structuretogo/go_interface.jinja +0 -0
  126. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/structuretogo/go_struct.jinja +0 -0
  127. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/structuretogo/go_test.jinja +0 -0
  128. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/structuretogo.py +0 -0
  129. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/structuretographql.py +0 -0
  130. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/structuretoiceberg.py +0 -0
  131. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/structuretojava/choice_core.jinja +0 -0
  132. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/structuretojava/class_core.jinja +0 -0
  133. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/structuretojava/enum_core.jinja +0 -0
  134. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/structuretojava/equals_hashcode.jinja +0 -0
  135. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/structuretojava/pom.xml.jinja +0 -0
  136. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/structuretojava/tuple_core.jinja +0 -0
  137. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/structuretojava.py +0 -0
  138. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/structuretojs/class_core.js.jinja +0 -0
  139. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/structuretojs/enum_core.js.jinja +0 -0
  140. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/structuretojs/package.json.jinja +0 -0
  141. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/structuretojs/test_class.js.jinja +0 -0
  142. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/structuretojs/test_enum.js.jinja +0 -0
  143. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/structuretojs/test_runner.js.jinja +0 -0
  144. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/structuretojs.py +0 -0
  145. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/structuretojsons.py +0 -0
  146. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/structuretokusto.py +0 -0
  147. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/structuretomd/README.md.jinja +0 -0
  148. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/structuretomd.py +0 -0
  149. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/structuretoproto.py +0 -0
  150. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/structuretopython/dataclass_core.jinja +0 -0
  151. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/structuretopython/enum_core.jinja +0 -0
  152. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/structuretopython/map_alias.jinja +0 -0
  153. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/structuretopython/pyproject_toml.jinja +0 -0
  154. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/structuretopython/test_class.jinja +0 -0
  155. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/structuretopython/test_enum.jinja +0 -0
  156. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/structuretopython.py +0 -0
  157. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/structuretorust/dataclass_enum.rs.jinja +0 -0
  158. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/structuretorust/dataclass_struct.rs.jinja +0 -0
  159. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/structuretorust/dataclass_union.rs.jinja +0 -0
  160. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/structuretorust.py +0 -0
  161. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/structuretots/class_core.ts.jinja +0 -0
  162. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/structuretots/enum_core.ts.jinja +0 -0
  163. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/structuretots/gitignore.jinja +0 -0
  164. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/structuretots/index.ts.jinja +0 -0
  165. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/structuretots/package.json.jinja +0 -0
  166. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/structuretots/test_class.ts.jinja +0 -0
  167. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/structuretots/tsconfig.json.jinja +0 -0
  168. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/structuretoxsd.py +0 -0
  169. {avrotize-2.22.2 → avrotize-3.0.1}/avrotize/xsdtoavro.py +0 -0
  170. {avrotize-2.22.2 → avrotize-3.0.1}/pyproject.toml +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: avrotize
3
- Version: 2.22.2
3
+ Version: 3.0.1
4
4
  Summary: Tools to convert from and to Avro Schema from various other schema languages.
5
5
  Author-email: Clemens Vasters <clemensv@microsoft.com>
6
6
  Requires-Python: >=3.10
@@ -48,6 +48,14 @@ Provides-Extra: dev
48
48
 
49
49
  # Avrotize & Structurize
50
50
 
51
+ [![PyPI version](https://img.shields.io/pypi/v/avrotize)](https://pypi.org/project/avrotize/)
52
+ [![Python Versions](https://img.shields.io/pypi/pyversions/avrotize)](https://pypi.org/project/avrotize/)
53
+ [![Build Status](https://github.com/clemensv/avrotize/actions/workflows/build_deploy.yml/badge.svg)](https://github.com/clemensv/avrotize/actions/workflows/build_deploy.yml)
54
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
55
+ [![Downloads](https://img.shields.io/pypi/dm/avrotize)](https://pypi.org/project/avrotize/)
56
+
57
+ **[📚 Documentation & Examples](https://clemensv.github.io/avrotize/)** | **[🎨 Conversion Gallery](https://clemensv.github.io/avrotize/gallery/)**
58
+
51
59
  Avrotize is a ["Rosetta Stone"](https://en.wikipedia.org/wiki/Rosetta_Stone) for data structure definitions, allowing you to convert between numerous data and database schema formats and to generate code for different programming languages.
52
60
 
53
61
  It is, for instance, a well-documented and predictable converter and code generator for data structures originally defined in JSON Schema (of arbitrary complexity).
@@ -90,13 +98,13 @@ Converting from Avrotize Schema:
90
98
  - [`avrotize a2k`](#convert-avrotize-schema-to-kusto-table-declaration) - Convert Avrotize Schema to Kusto table definition.
91
99
  - [`avrotize s2k`](#convert-json-structure-schema-to-kusto-table-declaration) - Convert JSON Structure Schema to Kusto table definition.
92
100
  - [`avrotize a2sql`](#convert-avrotize-schema-to-sql-table-definition) - Convert Avrotize Schema to SQL table definition.
93
- - [`avrotize struct2sql`](#convert-json-structure-schema-to-sql-schema) - Convert JSON Structure Schema to SQL table definition.
101
+ - [`avrotize s2sql`](#convert-json-structure-schema-to-sql-schema) - Convert JSON Structure Schema to SQL table definition.
94
102
  - [`avrotize a2pq`](#convert-avrotize-schema-to-empty-parquet-file) - Convert Avrotize Schema to Parquet or Iceberg schema.
95
103
  - [`avrotize a2ib`](#convert-avrotize-schema-to-iceberg-schema) - Convert Avrotize Schema to Iceberg schema.
96
104
  - [`avrotize s2ib`](#convert-json-structure-to-iceberg-schema) - Convert JSON Structure to Iceberg schema.
97
105
  - [`avrotize a2mongo`](#convert-avrotize-schema-to-mongodb-schema) - Convert Avrotize Schema to MongoDB schema.
98
106
  - [`avrotize a2cassandra`](#convert-avrotize-schema-to-cassandra-schema) - Convert Avrotize Schema to Cassandra schema.
99
- - [`avrotize struct2cassandra`](#convert-json-structure-schema-to-cassandra-schema) - Convert JSON Structure Schema to Cassandra schema.
107
+ - [`avrotize s2cassandra`](#convert-json-structure-schema-to-cassandra-schema) - Convert JSON Structure Schema to Cassandra schema.
100
108
  - [`avrotize a2es`](#convert-avrotize-schema-to-elasticsearch-schema) - Convert Avrotize Schema to Elasticsearch schema.
101
109
  - [`avrotize a2dynamodb`](#convert-avrotize-schema-to-dynamodb-schema) - Convert Avrotize Schema to DynamoDB schema.
102
110
  - [`avrotize a2cosmos`](#convert-avrotize-schema-to-cosmosdb-schema) - Convert Avrotize Schema to CosmosDB schema.
@@ -106,7 +114,7 @@ Converting from Avrotize Schema:
106
114
  - [`avrotize a2neo4j`](#convert-avrotize-schema-to-neo4j-schema) - Convert Avrotize Schema to Neo4j schema.
107
115
  - [`avrotize a2dp`](#convert-avrotize-schema-to-datapackage-schema) - Convert Avrotize Schema to Datapackage schema.
108
116
  - [`avrotize a2md`](#convert-avrotize-schema-to-markdown-documentation) - Convert Avrotize Schema to Markdown documentation.
109
- - [`avrotize struct2md`](#convert-json-structure-schema-to-markdown-documentation) - Convert JSON Structure schema to Markdown documentation.
117
+ - [`avrotize s2md`](#convert-json-structure-schema-to-markdown-documentation) - Convert JSON Structure schema to Markdown documentation.
110
118
 
111
119
  Direct conversions (JSON Structure):
112
120
 
@@ -137,7 +145,10 @@ Generate code from JSON Structure:
137
145
  Direct JSON Structure conversions:
138
146
 
139
147
  - [`avrotize s2csv`](#convert-json-structure-to-csv-schema) - Convert JSON Structure schema to CSV schema.
148
+ - [`avrotize a2csv`](#convert-avrotize-schema-to-csv-schema) - Convert Avrotize schema to CSV schema.
140
149
  - [`avrotize s2x`](#convert-json-structure-to-xml-schema-xsd) - Convert JSON Structure to XML Schema (XSD).
150
+ - [`avrotize s2graphql`](#convert-json-structure-schema-to-graphql-schema) - Convert JSON Structure schema to GraphQL schema.
151
+ - [`avrotize a2graphql`](#convert-avrotize-schema-to-graphql-schema) - Convert Avrotize schema to GraphQL schema.
141
152
 
142
153
  Other commands:
143
154
 
@@ -147,10 +158,6 @@ JSON Structure conversions:
147
158
 
148
159
  - [`avrotize s2dp`](#convert-json-structure-schema-to-datapackage-schema) - Convert JSON Structure schema to Datapackage schema.
149
160
 
150
- Direct conversions (not via Avrotize Schema):
151
-
152
- - [`avrotize struct2gql`](#convert-json-structure-schema-to-graphql-schema) - Convert JSON Structure schema to GraphQL schema.
153
-
154
161
  ## Overview
155
162
 
156
163
  You can use Avrotize to convert between Avro/Avrotize Schema and other schema formats like JSON Schema, XML Schema (XSD), Protocol Buffers (Protobuf), ASN.1, and database schema formats like Kusto Data Table Definition (KQL) and SQL Table Definition. That means you can also convert from JSON Schema to Protobuf going via Avrotize Schema.
@@ -489,7 +496,7 @@ For detailed conversion rules and type mappings for each SQL dialect, refer to t
489
496
  ### Convert JSON Structure Schema to SQL Schema
490
497
 
491
498
  ```bash
492
- avrotize struct2sql [input] --out <path_to_sql_script> --dialect <dialect> [--emit-cloudevents-columns]
499
+ avrotize s2sql [input] --out <path_to_sql_script> --dialect <dialect> [--emit-cloudevents-columns]
493
500
  ```
494
501
 
495
502
  Parameters:
@@ -545,7 +552,7 @@ Refer to the detailed conversion notes for Cassandra in the [NoSQL Conversion No
545
552
  ### Convert JSON Structure Schema to Cassandra Schema
546
553
 
547
554
  ```bash
548
- avrotize struct2cassandra [input] --out <output_file> [--emit-cloudevents-columns]
555
+ avrotize s2cassandra [input] --out <output_file> [--emit-cloudevents-columns]
549
556
  ```
550
557
 
551
558
  Parameters:
@@ -1153,7 +1160,7 @@ Conversion notes:
1153
1160
  ### Convert JSON Structure schema to Markdown documentation
1154
1161
 
1155
1162
  ```bash
1156
- avrotize struct2md <path_to_structure_schema_file> [--out <path_to_markdown_file>]
1163
+ avrotize s2md <path_to_structure_schema_file> [--out <path_to_markdown_file>]
1157
1164
  ```
1158
1165
 
1159
1166
  Parameters:
@@ -1201,6 +1208,25 @@ Conversion notes:
1201
1208
  - Enum and const keywords are supported and preserved in the output.
1202
1209
  - JSON Structure-specific features like `$ref`, `$extends`, definitions, and namespaces are resolved during conversion.
1203
1210
 
1211
+ ### Convert Avrotize Schema to CSV Schema
1212
+
1213
+ ```bash
1214
+ avrotize a2csv <path_to_avro_schema_file> [--out <path_to_csv_schema_file>]
1215
+ ```
1216
+
1217
+ Parameters:
1218
+
1219
+ - `<path_to_avro_schema_file>`: The path to the Avrotize schema file to be converted. If omitted, the file is read from stdin.
1220
+ - `--out`: The path to the CSV schema file to write the conversion result to. If omitted, the output is directed to stdout.
1221
+
1222
+ Conversion notes:
1223
+
1224
+ - The tool converts Avrotize schemas to CSV Schema format.
1225
+ - Avro primitive types (string, int, long, float, double, boolean, bytes) are mapped to appropriate CSV schema types.
1226
+ - Avro logical types (date, timestamp-millis, decimal, uuid) are preserved in the output.
1227
+ - Complex types (records, arrays, maps) are represented as strings in CSV schema, as CSV format doesn't have native support for nested structures.
1228
+ - Only single record types can be converted to CSV schema.
1229
+
1204
1230
  ### Convert JSON Structure to Protocol Buffers
1205
1231
 
1206
1232
  ```bash
@@ -1283,7 +1309,7 @@ Conversion notes:
1283
1309
  ### Convert JSON Structure schema to GraphQL schema
1284
1310
 
1285
1311
  ```bash
1286
- avrotize struct2gql [input] --out <path_to_graphql_schema_file>
1312
+ avrotize s2graphql [input] --out <path_to_graphql_schema_file>
1287
1313
  ```
1288
1314
 
1289
1315
  Parameters:
@@ -1308,12 +1334,43 @@ Example:
1308
1334
 
1309
1335
  ```bash
1310
1336
  # Convert a JSON Structure schema to GraphQL
1311
- avrotize struct2gql myschema.struct.json --out myschema.graphql
1337
+ avrotize s2graphql myschema.struct.json --out myschema.graphql
1312
1338
 
1313
1339
  # Read from stdin and write to stdout
1314
- cat myschema.struct.json | avrotize struct2gql > myschema.graphql
1340
+ cat myschema.struct.json | avrotize s2graphql > myschema.graphql
1341
+ ```
1342
+
1343
+ ### Convert Avrotize schema to GraphQL schema
1344
+
1345
+ ```bash
1346
+ avrotize a2graphql [input] --out <path_to_graphql_schema_file>
1315
1347
  ```
1316
1348
 
1349
+ Parameters:
1350
+
1351
+ - `[input]`: The path to the Avrotize schema file. If omitted, the file is read from stdin.
1352
+ - `--out <path_to_graphql_schema_file>`: The path to the output GraphQL schema file.
1353
+
1354
+ Conversion notes:
1355
+
1356
+ - Converts Avrotize schema to GraphQL schema language (SDL)
1357
+ - Avro primitive types (string, int, long, float, double, boolean, bytes) are mapped to GraphQL scalar types
1358
+ - Avro logical types (date, timestamp-millis, decimal, uuid) are mapped to custom GraphQL scalars
1359
+ - Avro record types become GraphQL object types
1360
+ - Avro arrays become GraphQL lists `[Type]`
1361
+ - Avro maps are represented using the JSON scalar type
1362
+ - Avro unions are converted to GraphQL union types
1363
+ - Avro enums become GraphQL enum types
1364
+
1365
+ Example:
1366
+
1367
+ ```bash
1368
+ # Convert an Avrotize schema to GraphQL
1369
+ avrotize a2graphql myschema.avsc --out myschema.graphql
1370
+
1371
+ # Read from stdin and write to stdout
1372
+ cat myschema.avsc | avrotize a2graphql > myschema.graphql
1373
+ ```
1317
1374
 
1318
1375
  This document provides an overview of the usage and functionality of Avrotize. For more detailed information, please refer to the [Avrotize Schema documentation](specs/avrotize-schema.md) and the individual command help messages.
1319
1376
 
@@ -1,5 +1,13 @@
1
1
  # Avrotize & Structurize
2
2
 
3
+ [![PyPI version](https://img.shields.io/pypi/v/avrotize)](https://pypi.org/project/avrotize/)
4
+ [![Python Versions](https://img.shields.io/pypi/pyversions/avrotize)](https://pypi.org/project/avrotize/)
5
+ [![Build Status](https://github.com/clemensv/avrotize/actions/workflows/build_deploy.yml/badge.svg)](https://github.com/clemensv/avrotize/actions/workflows/build_deploy.yml)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
+ [![Downloads](https://img.shields.io/pypi/dm/avrotize)](https://pypi.org/project/avrotize/)
8
+
9
+ **[📚 Documentation & Examples](https://clemensv.github.io/avrotize/)** | **[🎨 Conversion Gallery](https://clemensv.github.io/avrotize/gallery/)**
10
+
3
11
  Avrotize is a ["Rosetta Stone"](https://en.wikipedia.org/wiki/Rosetta_Stone) for data structure definitions, allowing you to convert between numerous data and database schema formats and to generate code for different programming languages.
4
12
 
5
13
  It is, for instance, a well-documented and predictable converter and code generator for data structures originally defined in JSON Schema (of arbitrary complexity).
@@ -42,13 +50,13 @@ Converting from Avrotize Schema:
42
50
  - [`avrotize a2k`](#convert-avrotize-schema-to-kusto-table-declaration) - Convert Avrotize Schema to Kusto table definition.
43
51
  - [`avrotize s2k`](#convert-json-structure-schema-to-kusto-table-declaration) - Convert JSON Structure Schema to Kusto table definition.
44
52
  - [`avrotize a2sql`](#convert-avrotize-schema-to-sql-table-definition) - Convert Avrotize Schema to SQL table definition.
45
- - [`avrotize struct2sql`](#convert-json-structure-schema-to-sql-schema) - Convert JSON Structure Schema to SQL table definition.
53
+ - [`avrotize s2sql`](#convert-json-structure-schema-to-sql-schema) - Convert JSON Structure Schema to SQL table definition.
46
54
  - [`avrotize a2pq`](#convert-avrotize-schema-to-empty-parquet-file) - Convert Avrotize Schema to Parquet or Iceberg schema.
47
55
  - [`avrotize a2ib`](#convert-avrotize-schema-to-iceberg-schema) - Convert Avrotize Schema to Iceberg schema.
48
56
  - [`avrotize s2ib`](#convert-json-structure-to-iceberg-schema) - Convert JSON Structure to Iceberg schema.
49
57
  - [`avrotize a2mongo`](#convert-avrotize-schema-to-mongodb-schema) - Convert Avrotize Schema to MongoDB schema.
50
58
  - [`avrotize a2cassandra`](#convert-avrotize-schema-to-cassandra-schema) - Convert Avrotize Schema to Cassandra schema.
51
- - [`avrotize struct2cassandra`](#convert-json-structure-schema-to-cassandra-schema) - Convert JSON Structure Schema to Cassandra schema.
59
+ - [`avrotize s2cassandra`](#convert-json-structure-schema-to-cassandra-schema) - Convert JSON Structure Schema to Cassandra schema.
52
60
  - [`avrotize a2es`](#convert-avrotize-schema-to-elasticsearch-schema) - Convert Avrotize Schema to Elasticsearch schema.
53
61
  - [`avrotize a2dynamodb`](#convert-avrotize-schema-to-dynamodb-schema) - Convert Avrotize Schema to DynamoDB schema.
54
62
  - [`avrotize a2cosmos`](#convert-avrotize-schema-to-cosmosdb-schema) - Convert Avrotize Schema to CosmosDB schema.
@@ -58,7 +66,7 @@ Converting from Avrotize Schema:
58
66
  - [`avrotize a2neo4j`](#convert-avrotize-schema-to-neo4j-schema) - Convert Avrotize Schema to Neo4j schema.
59
67
  - [`avrotize a2dp`](#convert-avrotize-schema-to-datapackage-schema) - Convert Avrotize Schema to Datapackage schema.
60
68
  - [`avrotize a2md`](#convert-avrotize-schema-to-markdown-documentation) - Convert Avrotize Schema to Markdown documentation.
61
- - [`avrotize struct2md`](#convert-json-structure-schema-to-markdown-documentation) - Convert JSON Structure schema to Markdown documentation.
69
+ - [`avrotize s2md`](#convert-json-structure-schema-to-markdown-documentation) - Convert JSON Structure schema to Markdown documentation.
62
70
 
63
71
  Direct conversions (JSON Structure):
64
72
 
@@ -89,7 +97,10 @@ Generate code from JSON Structure:
89
97
  Direct JSON Structure conversions:
90
98
 
91
99
  - [`avrotize s2csv`](#convert-json-structure-to-csv-schema) - Convert JSON Structure schema to CSV schema.
100
+ - [`avrotize a2csv`](#convert-avrotize-schema-to-csv-schema) - Convert Avrotize schema to CSV schema.
92
101
  - [`avrotize s2x`](#convert-json-structure-to-xml-schema-xsd) - Convert JSON Structure to XML Schema (XSD).
102
+ - [`avrotize s2graphql`](#convert-json-structure-schema-to-graphql-schema) - Convert JSON Structure schema to GraphQL schema.
103
+ - [`avrotize a2graphql`](#convert-avrotize-schema-to-graphql-schema) - Convert Avrotize schema to GraphQL schema.
93
104
 
94
105
  Other commands:
95
106
 
@@ -99,10 +110,6 @@ JSON Structure conversions:
99
110
 
100
111
  - [`avrotize s2dp`](#convert-json-structure-schema-to-datapackage-schema) - Convert JSON Structure schema to Datapackage schema.
101
112
 
102
- Direct conversions (not via Avrotize Schema):
103
-
104
- - [`avrotize struct2gql`](#convert-json-structure-schema-to-graphql-schema) - Convert JSON Structure schema to GraphQL schema.
105
-
106
113
  ## Overview
107
114
 
108
115
  You can use Avrotize to convert between Avro/Avrotize Schema and other schema formats like JSON Schema, XML Schema (XSD), Protocol Buffers (Protobuf), ASN.1, and database schema formats like Kusto Data Table Definition (KQL) and SQL Table Definition. That means you can also convert from JSON Schema to Protobuf going via Avrotize Schema.
@@ -441,7 +448,7 @@ For detailed conversion rules and type mappings for each SQL dialect, refer to t
441
448
  ### Convert JSON Structure Schema to SQL Schema
442
449
 
443
450
  ```bash
444
- avrotize struct2sql [input] --out <path_to_sql_script> --dialect <dialect> [--emit-cloudevents-columns]
451
+ avrotize s2sql [input] --out <path_to_sql_script> --dialect <dialect> [--emit-cloudevents-columns]
445
452
  ```
446
453
 
447
454
  Parameters:
@@ -497,7 +504,7 @@ Refer to the detailed conversion notes for Cassandra in the [NoSQL Conversion No
497
504
  ### Convert JSON Structure Schema to Cassandra Schema
498
505
 
499
506
  ```bash
500
- avrotize struct2cassandra [input] --out <output_file> [--emit-cloudevents-columns]
507
+ avrotize s2cassandra [input] --out <output_file> [--emit-cloudevents-columns]
501
508
  ```
502
509
 
503
510
  Parameters:
@@ -1105,7 +1112,7 @@ Conversion notes:
1105
1112
  ### Convert JSON Structure schema to Markdown documentation
1106
1113
 
1107
1114
  ```bash
1108
- avrotize struct2md <path_to_structure_schema_file> [--out <path_to_markdown_file>]
1115
+ avrotize s2md <path_to_structure_schema_file> [--out <path_to_markdown_file>]
1109
1116
  ```
1110
1117
 
1111
1118
  Parameters:
@@ -1153,6 +1160,25 @@ Conversion notes:
1153
1160
  - Enum and const keywords are supported and preserved in the output.
1154
1161
  - JSON Structure-specific features like `$ref`, `$extends`, definitions, and namespaces are resolved during conversion.
1155
1162
 
1163
+ ### Convert Avrotize Schema to CSV Schema
1164
+
1165
+ ```bash
1166
+ avrotize a2csv <path_to_avro_schema_file> [--out <path_to_csv_schema_file>]
1167
+ ```
1168
+
1169
+ Parameters:
1170
+
1171
+ - `<path_to_avro_schema_file>`: The path to the Avrotize schema file to be converted. If omitted, the file is read from stdin.
1172
+ - `--out`: The path to the CSV schema file to write the conversion result to. If omitted, the output is directed to stdout.
1173
+
1174
+ Conversion notes:
1175
+
1176
+ - The tool converts Avrotize schemas to CSV Schema format.
1177
+ - Avro primitive types (string, int, long, float, double, boolean, bytes) are mapped to appropriate CSV schema types.
1178
+ - Avro logical types (date, timestamp-millis, decimal, uuid) are preserved in the output.
1179
+ - Complex types (records, arrays, maps) are represented as strings in CSV schema, as CSV format doesn't have native support for nested structures.
1180
+ - Only single record types can be converted to CSV schema.
1181
+
1156
1182
  ### Convert JSON Structure to Protocol Buffers
1157
1183
 
1158
1184
  ```bash
@@ -1235,7 +1261,7 @@ Conversion notes:
1235
1261
  ### Convert JSON Structure schema to GraphQL schema
1236
1262
 
1237
1263
  ```bash
1238
- avrotize struct2gql [input] --out <path_to_graphql_schema_file>
1264
+ avrotize s2graphql [input] --out <path_to_graphql_schema_file>
1239
1265
  ```
1240
1266
 
1241
1267
  Parameters:
@@ -1260,11 +1286,42 @@ Example:
1260
1286
 
1261
1287
  ```bash
1262
1288
  # Convert a JSON Structure schema to GraphQL
1263
- avrotize struct2gql myschema.struct.json --out myschema.graphql
1289
+ avrotize s2graphql myschema.struct.json --out myschema.graphql
1264
1290
 
1265
1291
  # Read from stdin and write to stdout
1266
- cat myschema.struct.json | avrotize struct2gql > myschema.graphql
1292
+ cat myschema.struct.json | avrotize s2graphql > myschema.graphql
1293
+ ```
1294
+
1295
+ ### Convert Avrotize schema to GraphQL schema
1296
+
1297
+ ```bash
1298
+ avrotize a2graphql [input] --out <path_to_graphql_schema_file>
1267
1299
  ```
1268
1300
 
1301
+ Parameters:
1302
+
1303
+ - `[input]`: The path to the Avrotize schema file. If omitted, the file is read from stdin.
1304
+ - `--out <path_to_graphql_schema_file>`: The path to the output GraphQL schema file.
1305
+
1306
+ Conversion notes:
1307
+
1308
+ - Converts Avrotize schema to GraphQL schema language (SDL)
1309
+ - Avro primitive types (string, int, long, float, double, boolean, bytes) are mapped to GraphQL scalar types
1310
+ - Avro logical types (date, timestamp-millis, decimal, uuid) are mapped to custom GraphQL scalars
1311
+ - Avro record types become GraphQL object types
1312
+ - Avro arrays become GraphQL lists `[Type]`
1313
+ - Avro maps are represented using the JSON scalar type
1314
+ - Avro unions are converted to GraphQL union types
1315
+ - Avro enums become GraphQL enum types
1316
+
1317
+ Example:
1318
+
1319
+ ```bash
1320
+ # Convert an Avrotize schema to GraphQL
1321
+ avrotize a2graphql myschema.avsc --out myschema.graphql
1322
+
1323
+ # Read from stdin and write to stdout
1324
+ cat myschema.avsc | avrotize a2graphql > myschema.graphql
1325
+ ```
1269
1326
 
1270
1327
  This document provides an overview of the usage and functionality of Avrotize. For more detailed information, please refer to the [Avrotize Schema documentation](specs/avrotize-schema.md) and the individual command help messages.
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
28
28
  commit_id: COMMIT_ID
29
29
  __commit_id__: COMMIT_ID
30
30
 
31
- __version__ = version = '2.22.2'
32
- __version_tuple__ = version_tuple = (2, 22, 2)
31
+ __version__ = version = '3.0.1'
32
+ __version_tuple__ = version_tuple = (3, 0, 1)
33
33
 
34
- __commit_id__ = commit_id = 'g25efcf5da'
34
+ __commit_id__ = commit_id = 'g62e6bb75a'
@@ -39,7 +39,23 @@ class AvroToCSVSchemaConverter:
39
39
 
40
40
  :param avro_schema: Avro schema as a dictionary.
41
41
  :return: CSV schema as a dictionary.
42
+ :raises ValueError: If the schema is not a single record type.
42
43
  """
44
+ # Handle schema arrays (unions of records) - not supported
45
+ if isinstance(avro_schema, list):
46
+ raise ValueError(
47
+ "CSV schema conversion only supports single record schemas. "
48
+ "The provided schema is an array/union of multiple types. "
49
+ "Use --record-type to specify a single record type if available."
50
+ )
51
+
52
+ # Ensure it's a record type with fields
53
+ if not isinstance(avro_schema, dict) or 'fields' not in avro_schema:
54
+ raise ValueError(
55
+ "CSV schema conversion only supports Avro record types with 'fields'. "
56
+ f"The provided schema has type: {avro_schema.get('type', 'unknown') if isinstance(avro_schema, dict) else type(avro_schema).__name__}"
57
+ )
58
+
43
59
  csv_schema = {
44
60
  "fields": []
45
61
  }
@@ -685,7 +685,10 @@ def convert_avro_to_nosql(avro_schema_path, nosql_file_path, nosql_dialect, emit
685
685
  file_name = os.path.join(
686
686
  nosql_file_path, get_file_name(schema_list, get_nosql_file_extension(nosql_dialect)))
687
687
  with open(file_name, "w", encoding="utf-8") as nosql_file:
688
- nosql_file.write(model)
688
+ if isinstance(model, list):
689
+ nosql_file.write("\n".join(model))
690
+ else:
691
+ nosql_file.write(model)
689
692
 
690
693
  def get_nosql_file_extension(nosql_dialect):
691
694
  """
@@ -466,8 +466,8 @@ def convert_avro_to_go(avro_schema_path, go_file_path, package_name='', avro_ann
466
466
  avrotogo = AvroToGo(package_name)
467
467
  avrotogo.avro_annotation = avro_annotation
468
468
  avrotogo.json_annotation = json_annotation
469
- avrotogo.package_site = package_site
470
- avrotogo.package_username = package_username
469
+ avrotogo.package_site = package_site if package_site else 'github.com'
470
+ avrotogo.package_username = package_username if package_username else 'username'
471
471
  avrotogo.convert(avro_schema_path, go_file_path)
472
472
 
473
473
 
@@ -484,6 +484,6 @@ def convert_avro_schema_to_go(avro_schema: JsonNode, output_dir: str, package_na
484
484
  avrotogo = AvroToGo(package_name)
485
485
  avrotogo.avro_annotation = avro_annotation
486
486
  avrotogo.json_annotation = json_annotation
487
- avrotogo.package_site = package_site
488
- avrotogo.package_username = package_username
487
+ avrotogo.package_site = package_site if package_site else 'github.com'
488
+ avrotogo.package_username = package_username if package_username else 'username'
489
489
  avrotogo.convert_schema(avro_schema, output_dir)
@@ -649,6 +649,108 @@
649
649
  }
650
650
  ]
651
651
  },
652
+ {
653
+ "command": "s2k",
654
+ "description": "Convert JSON Structure schema to Kusto table schemas",
655
+ "group": "4_RTDB",
656
+ "function": {
657
+ "name": "avrotize.structuretokusto.convert_structure_to_kusto",
658
+ "args": {
659
+ "structure_schema_path": "input_file_path",
660
+ "kusto_file_path": "output_file_path",
661
+ "kusto_uri": "args.kusto_uri",
662
+ "kusto_database": "args.kusto_database",
663
+ "structure_record_type": "args.record_type",
664
+ "emit_cloudevents_columns": "args.emit_cloudevents_columns",
665
+ "emit_cloudevents_dispatch_table": "args.emit_cloudevents_dispatch"
666
+ }
667
+ },
668
+ "extensions": [
669
+ ".struct.json",
670
+ ".json"
671
+ ],
672
+ "args": [
673
+ {
674
+ "name": "input",
675
+ "type": "str",
676
+ "nargs": "?",
677
+ "help": "Path to the JSON Structure schema file (or read from stdin if omitted)",
678
+ "required": false
679
+ },
680
+ {
681
+ "name": "--out",
682
+ "type": "str",
683
+ "help": "Path to the Kusto table schema file",
684
+ "required": false
685
+ },
686
+ {
687
+ "name": "--struct",
688
+ "type": "str",
689
+ "help": "Deprecated: Path to the JSON Structure schema file (for backcompat)",
690
+ "required": false
691
+ },
692
+ {
693
+ "name": "--kusto-uri",
694
+ "type": "str",
695
+ "help": "Kusto Cluster URI to apply the generated schema to.",
696
+ "required": false
697
+ },
698
+ {
699
+ "name": "--kusto-database",
700
+ "type": "str",
701
+ "help": "Kusto database name to apply the generated schema to",
702
+ "required": false
703
+ },
704
+ {
705
+ "name": "--record-type",
706
+ "type": "str",
707
+ "help": "Record type in the JSON Structure schema",
708
+ "required": false
709
+ },
710
+ {
711
+ "name": "--emit-cloudevents-columns",
712
+ "type": "bool",
713
+ "help": "Add CloudEvents columns to the Kusto table",
714
+ "default": false,
715
+ "required": false
716
+ },
717
+ {
718
+ "name": "--emit-cloudevents-dispatch",
719
+ "type": "bool",
720
+ "help": "Emit a _cloudevents_dispatch ingestion table and update policies for each generated table",
721
+ "required": false
722
+ }
723
+ ],
724
+ "suggested_output_file_path": "{input_file_name}.kql",
725
+ "prompts": [
726
+ {
727
+ "name": "--kusto-uri",
728
+ "message": "Enter the Kusto Cluster URI (optional)",
729
+ "type": "str",
730
+ "required": false
731
+ },
732
+ {
733
+ "name": "--kusto-database",
734
+ "message": "Enter the Kusto database name (optional)",
735
+ "type": "str",
736
+ "required": false
737
+ },
738
+ {
739
+ "name": "--emit-cloudevents-columns",
740
+ "message": "Add CloudEvents columns to the Kusto table?",
741
+ "type": "bool",
742
+ "default": false,
743
+ "required": false
744
+ },
745
+ {
746
+ "name": "--emit-cloudevents-dispatch",
747
+ "message": "Emit a _cloudevents_dispatch ingestion table and update policies?",
748
+ "type": "bool",
749
+ "default": false,
750
+ "required": false
751
+ }
752
+ ]
753
+ },
652
754
  {
653
755
  "command": "k2a",
654
756
  "description": "Convert Kusto schema to Avrotize schema",
@@ -836,7 +938,7 @@
836
938
  ]
837
939
  },
838
940
  {
839
- "command": "struct2sql",
941
+ "command": "s2sql",
840
942
  "description": "Convert JSON Structure schema to SQL schema",
841
943
  "group": "5_SQL",
842
944
  "function": {
@@ -1821,6 +1923,44 @@
1821
1923
  "suggested_output_file_path": "{input_file_name}.csv.json",
1822
1924
  "prompts": []
1823
1925
  },
1926
+ {
1927
+ "command": "a2csv",
1928
+ "description": "Convert Avrotize schema to CSV schema",
1929
+ "group": "1_Schemas",
1930
+ "function": {
1931
+ "name": "avrotize.avrotocsv.convert_avro_to_csv_schema",
1932
+ "args": {
1933
+ "avro_schema_path": "input_file_path",
1934
+ "csv_schema_path": "output_file_path"
1935
+ }
1936
+ },
1937
+ "extensions": [
1938
+ ".avsc"
1939
+ ],
1940
+ "args": [
1941
+ {
1942
+ "name": "input",
1943
+ "type": "str",
1944
+ "nargs": "?",
1945
+ "help": "Path to the Avrotize schema file (or read from stdin if omitted)",
1946
+ "required": false
1947
+ },
1948
+ {
1949
+ "name": "--out",
1950
+ "type": "str",
1951
+ "help": "Output path for the CSV schema file",
1952
+ "required": false
1953
+ },
1954
+ {
1955
+ "name": "--avsc",
1956
+ "type": "str",
1957
+ "help": "Deprecated: Path to the Avrotize schema file (for backcompat)",
1958
+ "required": false
1959
+ }
1960
+ ],
1961
+ "suggested_output_file_path": "{input_file_name}.csv.json",
1962
+ "prompts": []
1963
+ },
1824
1964
  {
1825
1965
  "command": "s2rust",
1826
1966
  "description": "Convert JSON Structure to Rust classes",
@@ -2147,7 +2287,7 @@
2147
2287
  ]
2148
2288
  },
2149
2289
  {
2150
- "command": "struct2gql",
2290
+ "command": "s2graphql",
2151
2291
  "description": "Convert JSON Structure schema to GraphQL schema",
2152
2292
  "group": "1_Schemas",
2153
2293
  "function": {
@@ -2179,6 +2319,44 @@
2179
2319
  "suggested_output_file_path": "{input_file_name}.graphql",
2180
2320
  "prompts": []
2181
2321
  },
2322
+ {
2323
+ "command": "a2graphql",
2324
+ "description": "Convert Avrotize schema to GraphQL schema",
2325
+ "group": "1_Schemas",
2326
+ "function": {
2327
+ "name": "avrotize.avrotographql.convert_avro_to_graphql",
2328
+ "args": {
2329
+ "avro_schema_path": "input_file_path",
2330
+ "graphql_schema_path": "output_file_path"
2331
+ }
2332
+ },
2333
+ "extensions": [
2334
+ ".avsc"
2335
+ ],
2336
+ "args": [
2337
+ {
2338
+ "name": "input",
2339
+ "type": "str",
2340
+ "nargs": "?",
2341
+ "help": "Path to the Avrotize schema file (or read from stdin if omitted)",
2342
+ "required": false
2343
+ },
2344
+ {
2345
+ "name": "--out",
2346
+ "type": "str",
2347
+ "help": "Path to the GraphQL schema file",
2348
+ "required": false
2349
+ },
2350
+ {
2351
+ "name": "--avsc",
2352
+ "type": "str",
2353
+ "help": "Deprecated: Path to the Avrotize schema file (for backcompat)",
2354
+ "required": false
2355
+ }
2356
+ ],
2357
+ "suggested_output_file_path": "{input_file_name}.graphql",
2358
+ "prompts": []
2359
+ },
2182
2360
  {
2183
2361
  "command": "a2ts",
2184
2362
  "description": "Convert Avrotize schema to TypeScript classes",
@@ -2824,7 +3002,7 @@
2824
3002
  ]
2825
3003
  },
2826
3004
  {
2827
- "command": "struct2cassandra",
3005
+ "command": "s2cassandra",
2828
3006
  "description": "Convert JSON Structure schema to Cassandra schema",
2829
3007
  "group": "5_SQL",
2830
3008
  "function": {
@@ -3368,7 +3546,7 @@
3368
3546
  "prompts": []
3369
3547
  },
3370
3548
  {
3371
- "command": "struct2md",
3549
+ "command": "s2md",
3372
3550
  "description": "Convert JSON Structure schema to Markdown documentation",
3373
3551
  "group": "7_Utility",
3374
3552
  "function": {
@@ -32,7 +32,7 @@ class StructureToTypeScript:
32
32
  """ Converts JSON Structure schema to TypeScript classes """
33
33
 
34
34
  def __init__(self, base_package: str = '', typedjson_annotation=False, avro_annotation=False) -> None:
35
- self.base_package = base_package
35
+ self.base_package = base_package or ''
36
36
  self.typedjson_annotation = typedjson_annotation
37
37
  self.avro_annotation = avro_annotation
38
38
  self.output_dir = os.getcwd()
File without changes
File without changes
File without changes
File without changes