api-foundry 0.8.7__tar.gz → 0.8.8__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: api-foundry
3
- Version: 0.8.7
3
+ Version: 0.8.8
4
4
  Summary: The `api_foundry` project is a powerful tool designed to automate the deployment of REST APIs on AWS using Lambda services to access and interact with relational databases (RDBMS). This project leverages the OpenAPI specification to define and manage the APIs
5
5
  Project-URL: Documentation, https://github.com/DanRepik/api-foundry
6
6
  Project-URL: Source, https://github.com/DanRepik/api-foundry
@@ -1,5 +1,5 @@
1
1
  # __init__.py
2
- __version__ = "0.8.7"
2
+ __version__ = "0.8.8"
3
3
 
4
4
  from api_foundry.iac.pulumi.api_foundry import APIFoundry
5
5
  from cloud_foundry import logger
@@ -620,9 +620,17 @@ class PathOperation(OpenAPIElement):
620
620
 
621
621
  def __init__(self, path: str, method: str, path_operation: Dict[str, Any]):
622
622
  super().__init__()
623
- self.entity = path.lower().rsplit("/", 1)[-1]
624
623
  self.action = METHODS_TO_ACTIONS[method]
625
624
 
625
+ parts = [p for p in path.lower().split("/") if p]
626
+ api_prefixes = {"api", "v1", "v2", "v3"}
627
+ literal_parts = [
628
+ p
629
+ for p in parts
630
+ if p not in api_prefixes and not (p.startswith("{") and p.endswith("}"))
631
+ ]
632
+ self.entity = "_".join(literal_parts)
633
+
626
634
  # Validate required x-af-database attribute
627
635
  if "x-af-database" not in path_operation:
628
636
  raise ApplicationException(
File without changes
File without changes
File without changes