nsj-rest-lib2 0.0.5__tar.gz → 0.0.7__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 (37) hide show
  1. {nsj_rest_lib2-0.0.5 → nsj_rest_lib2-0.0.7}/PKG-INFO +1 -1
  2. {nsj_rest_lib2-0.0.5 → nsj_rest_lib2-0.0.7}/nsj_rest_lib2/compiler/dto_compiler.py +12 -0
  3. nsj_rest_lib2-0.0.7/nsj_rest_lib2/compiler/util/str_util.py +22 -0
  4. nsj_rest_lib2-0.0.7/nsj_rest_lib2/compiler/util/type_util.py +12 -0
  5. nsj_rest_lib2-0.0.7/nsj_rest_lib2/service/__init__.py +0 -0
  6. {nsj_rest_lib2-0.0.5 → nsj_rest_lib2-0.0.7}/nsj_rest_lib2.egg-info/PKG-INFO +1 -1
  7. {nsj_rest_lib2-0.0.5 → nsj_rest_lib2-0.0.7}/nsj_rest_lib2.egg-info/SOURCES.txt +6 -0
  8. {nsj_rest_lib2-0.0.5 → nsj_rest_lib2-0.0.7}/setup.cfg +1 -1
  9. {nsj_rest_lib2-0.0.5 → nsj_rest_lib2-0.0.7}/README.md +0 -0
  10. {nsj_rest_lib2-0.0.5 → nsj_rest_lib2-0.0.7}/nsj_rest_lib2/__init__.py +0 -0
  11. {nsj_rest_lib2-0.0.5 → nsj_rest_lib2-0.0.7}/nsj_rest_lib2/compiler/__init__.py +0 -0
  12. {nsj_rest_lib2-0.0.5 → nsj_rest_lib2-0.0.7}/nsj_rest_lib2/compiler/ai_compiler.py +0 -0
  13. {nsj_rest_lib2-0.0.5 → nsj_rest_lib2-0.0.7}/nsj_rest_lib2/compiler/compiler.py +0 -0
  14. {nsj_rest_lib2-0.0.5 → nsj_rest_lib2-0.0.7}/nsj_rest_lib2/compiler/compiler_structures.py +0 -0
  15. {nsj_rest_lib2-0.0.5 → nsj_rest_lib2-0.0.7}/nsj_rest_lib2/compiler/edl_model/__init__.py +0 -0
  16. {nsj_rest_lib2-0.0.5 → nsj_rest_lib2-0.0.7}/nsj_rest_lib2/compiler/edl_model/ai_entity_edl.py +0 -0
  17. {nsj_rest_lib2-0.0.5 → nsj_rest_lib2-0.0.7}/nsj_rest_lib2/compiler/edl_model/api_model.py +0 -0
  18. {nsj_rest_lib2-0.0.5 → nsj_rest_lib2-0.0.7}/nsj_rest_lib2/compiler/edl_model/column_meta_model.py +0 -0
  19. {nsj_rest_lib2-0.0.5 → nsj_rest_lib2-0.0.7}/nsj_rest_lib2/compiler/edl_model/entity_model.py +0 -0
  20. {nsj_rest_lib2-0.0.5 → nsj_rest_lib2-0.0.7}/nsj_rest_lib2/compiler/edl_model/index_model.py +0 -0
  21. {nsj_rest_lib2-0.0.5 → nsj_rest_lib2-0.0.7}/nsj_rest_lib2/compiler/edl_model/primitives.py +0 -0
  22. {nsj_rest_lib2-0.0.5 → nsj_rest_lib2-0.0.7}/nsj_rest_lib2/compiler/edl_model/property_meta_model.py +0 -0
  23. {nsj_rest_lib2-0.0.5 → nsj_rest_lib2-0.0.7}/nsj_rest_lib2/compiler/edl_model/repository_model.py +0 -0
  24. {nsj_rest_lib2-0.0.5 → nsj_rest_lib2-0.0.7}/nsj_rest_lib2/compiler/edl_model/trait_property_meta_model.py +0 -0
  25. {nsj_rest_lib2-0.0.5 → nsj_rest_lib2-0.0.7}/nsj_rest_lib2/compiler/entity_compiler.py +0 -0
  26. {nsj_rest_lib2-0.0.5 → nsj_rest_lib2-0.0.7}/nsj_rest_lib2/compiler/property_compiler.py +0 -0
  27. {nsj_rest_lib2-0.0.5/nsj_rest_lib2/controller → nsj_rest_lib2-0.0.7/nsj_rest_lib2/compiler/util}/__init__.py +0 -0
  28. {nsj_rest_lib2-0.0.5/nsj_rest_lib2/service → nsj_rest_lib2-0.0.7/nsj_rest_lib2/controller}/__init__.py +0 -0
  29. {nsj_rest_lib2-0.0.5 → nsj_rest_lib2-0.0.7}/nsj_rest_lib2/controller/dynamic_controller.py +0 -0
  30. {nsj_rest_lib2-0.0.5 → nsj_rest_lib2-0.0.7}/nsj_rest_lib2/exception.py +0 -0
  31. {nsj_rest_lib2-0.0.5 → nsj_rest_lib2-0.0.7}/nsj_rest_lib2/redis_config.py +0 -0
  32. {nsj_rest_lib2-0.0.5 → nsj_rest_lib2-0.0.7}/nsj_rest_lib2/service/entity_loader.py +0 -0
  33. {nsj_rest_lib2-0.0.5 → nsj_rest_lib2-0.0.7}/nsj_rest_lib2/settings.py +0 -0
  34. {nsj_rest_lib2-0.0.5 → nsj_rest_lib2-0.0.7}/nsj_rest_lib2.egg-info/dependency_links.txt +0 -0
  35. {nsj_rest_lib2-0.0.5 → nsj_rest_lib2-0.0.7}/nsj_rest_lib2.egg-info/requires.txt +0 -0
  36. {nsj_rest_lib2-0.0.5 → nsj_rest_lib2-0.0.7}/nsj_rest_lib2.egg-info/top_level.txt +0 -0
  37. {nsj_rest_lib2-0.0.5 → nsj_rest_lib2-0.0.7}/pyproject.toml +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nsj_rest_lib2
3
- Version: 0.0.5
3
+ Version: 0.0.7
4
4
  Summary: Biblioteca para permitir a distribuição de rotas dinâmicas numa API, configuradas por meio de EDLs declarativos (em formato JSON).
5
5
  Home-page: https://github.com/Nasajon/nsj_rest_lib2
6
6
  Author: Nasajon Sistemas
@@ -50,6 +50,18 @@ class DTOCompiler:
50
50
  names=[ast.alias(name="DTOField", asname=None)],
51
51
  level=0,
52
52
  ),
53
+ # from nsj_rest_lib.descriptor.dto_field_validators import DTOFieldValidators
54
+ ast.ImportFrom(
55
+ module="nsj_rest_lib.descriptor.dto_field_validators",
56
+ names=[ast.alias(name="DTOFieldValidators", asname=None)],
57
+ level=0,
58
+ ),
59
+ # from nsj_rest_lib.dto.dto_base import DTOBase
60
+ ast.ImportFrom(
61
+ module="nsj_rest_lib.dto.dto_base",
62
+ names=[ast.alias(name="DTOBase", asname=None)],
63
+ level=0,
64
+ ),
53
65
  ]
54
66
 
55
67
  class_name = f"{CompilerStrUtil.to_pascal_case(entity_model.id)}DTO"
@@ -0,0 +1,22 @@
1
+ class CompilerStrUtil:
2
+ @staticmethod
3
+ def to_camel_case(snake_str: str) -> str:
4
+ """Converte uma string de snake_case para camelCase."""
5
+ components = snake_str.split("_")
6
+ return components[0] + "".join(x.title() for x in components[1:])
7
+
8
+ @staticmethod
9
+ def to_pascal_case(snake_str: str) -> str:
10
+ """Converte uma string de snake_case para PascalCase."""
11
+ components = snake_str.split("_")
12
+ return "".join(x.title() for x in components)
13
+
14
+ @staticmethod
15
+ def to_snake_case(camel_str: str) -> str:
16
+ """Converte uma string de camelCase ou PascalCase para snake_case."""
17
+ snake_str = ""
18
+ for i, char in enumerate(camel_str):
19
+ if char.isupper() and i != 0:
20
+ snake_str += "_"
21
+ snake_str += char.lower()
22
+ return snake_str
@@ -0,0 +1,12 @@
1
+ from nsj_rest_lib2.compiler.edl_model.primitives import (
2
+ MAPPING_PRIMITIVE_TYPES_TO_PYTHON,
3
+ PrimitiveTypes,
4
+ )
5
+
6
+
7
+ class TypeUtil:
8
+ @staticmethod
9
+ def property_type_to_python_type(prop_type: PrimitiveTypes) -> str:
10
+ """Mapeia tipos de propriedades do EDL para tipos Python."""
11
+
12
+ return MAPPING_PRIMITIVE_TYPES_TO_PYTHON[prop_type]
File without changes
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nsj_rest_lib2
3
- Version: 0.0.5
3
+ Version: 0.0.7
4
4
  Summary: Biblioteca para permitir a distribuição de rotas dinâmicas numa API, configuradas por meio de EDLs declarativos (em formato JSON).
5
5
  Home-page: https://github.com/Nasajon/nsj_rest_lib2
6
6
  Author: Nasajon Sistemas
@@ -27,6 +27,9 @@ setup.cfg
27
27
  ./nsj_rest_lib2/compiler/edl_model/property_meta_model.py
28
28
  ./nsj_rest_lib2/compiler/edl_model/repository_model.py
29
29
  ./nsj_rest_lib2/compiler/edl_model/trait_property_meta_model.py
30
+ ./nsj_rest_lib2/compiler/util/__init__.py
31
+ ./nsj_rest_lib2/compiler/util/str_util.py
32
+ ./nsj_rest_lib2/compiler/util/type_util.py
30
33
  ./nsj_rest_lib2/controller/__init__.py
31
34
  ./nsj_rest_lib2/controller/dynamic_controller.py
32
35
  ./nsj_rest_lib2/service/__init__.py
@@ -57,6 +60,9 @@ nsj_rest_lib2/compiler/edl_model/primitives.py
57
60
  nsj_rest_lib2/compiler/edl_model/property_meta_model.py
58
61
  nsj_rest_lib2/compiler/edl_model/repository_model.py
59
62
  nsj_rest_lib2/compiler/edl_model/trait_property_meta_model.py
63
+ nsj_rest_lib2/compiler/util/__init__.py
64
+ nsj_rest_lib2/compiler/util/str_util.py
65
+ nsj_rest_lib2/compiler/util/type_util.py
60
66
  nsj_rest_lib2/controller/__init__.py
61
67
  nsj_rest_lib2/controller/dynamic_controller.py
62
68
  nsj_rest_lib2/service/__init__.py
@@ -1,6 +1,6 @@
1
1
  [metadata]
2
2
  name = nsj_rest_lib2
3
- version = 0.0.5
3
+ version = 0.0.7
4
4
  author = Nasajon Sistemas
5
5
  author_email = contact.dev@nasajon.com.br
6
6
  description = Biblioteca para permitir a distribuição de rotas dinâmicas numa API, configuradas por meio de EDLs declarativos (em formato JSON).
File without changes