api-foundry 0.8.4__tar.gz → 0.8.5__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.
- {api_foundry-0.8.4 → api_foundry-0.8.5}/PKG-INFO +1 -1
- {api_foundry-0.8.4 → api_foundry-0.8.5}/api_foundry/iac/gateway_spec.py +12 -27
- {api_foundry-0.8.4 → api_foundry-0.8.5}/api_foundry/iac/pulumi/api_foundry.py +4 -2
- {api_foundry-0.8.4 → api_foundry-0.8.5}/pyproject.toml +1 -1
- {api_foundry-0.8.4 → api_foundry-0.8.5}/.gitignore +0 -0
- {api_foundry-0.8.4 → api_foundry-0.8.5}/LICENSE +0 -0
- {api_foundry-0.8.4 → api_foundry-0.8.5}/api_foundry/__init__.py +0 -0
- {api_foundry-0.8.4 → api_foundry-0.8.5}/api_foundry/scripts/install_secret.py +0 -0
- {api_foundry-0.8.4 → api_foundry-0.8.5}/api_foundry/scripts/postgres_to_openapi.py +0 -0
- {api_foundry-0.8.4 → api_foundry-0.8.5}/api_foundry/utils/app_exception.py +0 -0
- {api_foundry-0.8.4 → api_foundry-0.8.5}/api_foundry/utils/logger.py +0 -0
- {api_foundry-0.8.4 → api_foundry-0.8.5}/api_foundry/utils/model_factory.py +0 -0
- {api_foundry-0.8.4 → api_foundry-0.8.5}/api_foundry/utils/schema_validator.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: api-foundry
|
|
3
|
-
Version: 0.8.
|
|
3
|
+
Version: 0.8.5
|
|
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
|
|
@@ -584,7 +584,7 @@ class APISpecEditor:
|
|
|
584
584
|
|
|
585
585
|
def generate_batch_operation(self, path: str):
|
|
586
586
|
"""Generate batch operations endpoint with full schema definitions."""
|
|
587
|
-
|
|
587
|
+
|
|
588
588
|
# Define batch component schemas
|
|
589
589
|
batch_schemas = {
|
|
590
590
|
"BatchRequest": {
|
|
@@ -595,9 +595,7 @@ class APISpecEditor:
|
|
|
595
595
|
"type": "array",
|
|
596
596
|
"minItems": 1,
|
|
597
597
|
"maxItems": 100,
|
|
598
|
-
"items": {
|
|
599
|
-
"$ref": "#/components/schemas/BatchOperation"
|
|
600
|
-
},
|
|
598
|
+
"items": {"$ref": "#/components/schemas/BatchOperation"},
|
|
601
599
|
},
|
|
602
600
|
"options": {
|
|
603
601
|
"type": "object",
|
|
@@ -610,9 +608,7 @@ class APISpecEditor:
|
|
|
610
608
|
"continueOnError": {
|
|
611
609
|
"type": "boolean",
|
|
612
610
|
"default": False,
|
|
613
|
-
"description": (
|
|
614
|
-
"Continue executing after errors"
|
|
615
|
-
),
|
|
611
|
+
"description": ("Continue executing after errors"),
|
|
616
612
|
},
|
|
617
613
|
},
|
|
618
614
|
},
|
|
@@ -655,9 +651,7 @@ class APISpecEditor:
|
|
|
655
651
|
"depends_on": {
|
|
656
652
|
"type": "array",
|
|
657
653
|
"items": {"type": "string"},
|
|
658
|
-
"description": (
|
|
659
|
-
"IDs of operations that must complete first"
|
|
660
|
-
),
|
|
654
|
+
"description": ("IDs of operations that must complete first"),
|
|
661
655
|
},
|
|
662
656
|
"claims": {
|
|
663
657
|
"type": "object",
|
|
@@ -675,15 +669,11 @@ class APISpecEditor:
|
|
|
675
669
|
"results": {
|
|
676
670
|
"type": "object",
|
|
677
671
|
"additionalProperties": True,
|
|
678
|
-
"description": (
|
|
679
|
-
"Map of operation IDs to results or errors"
|
|
680
|
-
),
|
|
672
|
+
"description": ("Map of operation IDs to results or errors"),
|
|
681
673
|
},
|
|
682
674
|
"errors": {
|
|
683
675
|
"type": "array",
|
|
684
|
-
"items": {
|
|
685
|
-
"$ref": "#/components/schemas/OperationError"
|
|
686
|
-
},
|
|
676
|
+
"items": {"$ref": "#/components/schemas/OperationError"},
|
|
687
677
|
"description": "List of errors that occurred",
|
|
688
678
|
},
|
|
689
679
|
},
|
|
@@ -723,16 +713,17 @@ class APISpecEditor:
|
|
|
723
713
|
# Add schemas to the editor's spec by directly accessing components
|
|
724
714
|
# The editor will handle this when generating the final YAML
|
|
725
715
|
import yaml as yaml_lib
|
|
716
|
+
|
|
726
717
|
current_spec = yaml_lib.safe_load(self.editor.yaml)
|
|
727
718
|
if "components" not in current_spec:
|
|
728
719
|
current_spec["components"] = {}
|
|
729
720
|
if "schemas" not in current_spec["components"]:
|
|
730
721
|
current_spec["components"]["schemas"] = {}
|
|
731
|
-
|
|
722
|
+
|
|
732
723
|
# Add batch schemas
|
|
733
724
|
for schema_name, schema_def in batch_schemas.items():
|
|
734
725
|
current_spec["components"]["schemas"][schema_name] = schema_def
|
|
735
|
-
|
|
726
|
+
|
|
736
727
|
# Update the editor with the modified spec
|
|
737
728
|
self.editor = AWSOpenAPISpecEditor(current_spec)
|
|
738
729
|
|
|
@@ -752,9 +743,7 @@ class APISpecEditor:
|
|
|
752
743
|
"required": True,
|
|
753
744
|
"content": {
|
|
754
745
|
"application/json": {
|
|
755
|
-
"schema": {
|
|
756
|
-
"$ref": "#/components/schemas/BatchRequest"
|
|
757
|
-
}
|
|
746
|
+
"schema": {"$ref": "#/components/schemas/BatchRequest"}
|
|
758
747
|
}
|
|
759
748
|
},
|
|
760
749
|
},
|
|
@@ -764,9 +753,7 @@ class APISpecEditor:
|
|
|
764
753
|
"content": {
|
|
765
754
|
"application/json": {
|
|
766
755
|
"schema": {
|
|
767
|
-
"$ref": (
|
|
768
|
-
"#/components/schemas/BatchResponse"
|
|
769
|
-
)
|
|
756
|
+
"$ref": ("#/components/schemas/BatchResponse")
|
|
770
757
|
}
|
|
771
758
|
}
|
|
772
759
|
},
|
|
@@ -776,9 +763,7 @@ class APISpecEditor:
|
|
|
776
763
|
"content": {
|
|
777
764
|
"application/json": {
|
|
778
765
|
"schema": {
|
|
779
|
-
"$ref": (
|
|
780
|
-
"#/components/schemas/ErrorResponse"
|
|
781
|
-
)
|
|
766
|
+
"$ref": ("#/components/schemas/ErrorResponse")
|
|
782
767
|
}
|
|
783
768
|
}
|
|
784
769
|
},
|
|
@@ -163,7 +163,7 @@ class APIFoundry(ComponentResource):
|
|
|
163
163
|
)
|
|
164
164
|
|
|
165
165
|
requirements.extend(
|
|
166
|
-
["psycopg2-binary", "pyyaml", "
|
|
166
|
+
["psycopg2-binary", "pyyaml", "api_foundry_query_engine"]
|
|
167
167
|
)
|
|
168
168
|
if env_vars.get("JWKS_HOST"):
|
|
169
169
|
requirements.extend(["PyJWT", "cryptography", "requests"])
|
|
@@ -183,7 +183,9 @@ class APIFoundry(ComponentResource):
|
|
|
183
183
|
)
|
|
184
184
|
|
|
185
185
|
gateway_spec = APISpecEditor(
|
|
186
|
-
open_api_spec=api_spec_dict,
|
|
186
|
+
open_api_spec=api_spec_dict,
|
|
187
|
+
function=self.api_function,
|
|
188
|
+
batch_path=batch_path,
|
|
187
189
|
)
|
|
188
190
|
|
|
189
191
|
# Merge gateway_spec.integrations with user-provided integrations
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|