Skip to content

Commit 6fe715b

Browse files
committed
feat: implements jsonata workflow, fixes AccessLogFormat requiring format in a single line.
1 parent f35aaac commit 6fe715b

23 files changed

Lines changed: 171 additions & 390 deletions

Unicorn.Contracts/ContractsService/ContractsService.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
<PackageReference Include="AWS.Lambda.Powertools.Tracing" Version="1.6.1" />
1919
<PackageReference Include="AWSSDK.DynamoDBv2" Version="4.0.1" />
2020
<PackageReference Include="AWSXRayRecorder.Handlers.AwsSdk" Version="2.13.0" />
21+
<PackageReference Include="AWSSDK.Core" Version="4.0.0.5" />
2122
</ItemGroup>
2223
</Project>
2324

Unicorn.Contracts/samconfig.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ watch = true
2727
warm_containers = "EAGER"
2828

2929
[default.local_start_lambda.parameters]
30-
warm_containers = "EAGER"
30+
warm_containers = "EAGER"

Unicorn.Contracts/template.yaml

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Mappings:
3838
Value: "AWS Serverless Developer Experience"
3939

4040
Conditions:
41-
IsProd: !Equals [!Ref Stage, Prod]
41+
IsProd: !Equals [!Ref Stage, prod]
4242

4343
Globals:
4444
Api:
@@ -132,17 +132,16 @@ Resources:
132132
ThrottlingRateLimit: 100
133133
AccessLogSetting:
134134
DestinationArn: !GetAtt UnicornContractsApiLogGroup.Arn
135-
Format: |
136-
{
137-
"requestId": "$context.requestId",
138-
"integration-error": "$context.integration.error",
139-
"integration-status": "$context.integration.status",
140-
"integration-latency": "$context.integration.latency",
141-
"integration-requestId": "$context.integration.requestId",
142-
"integration-integrationStatus": "$context.integration.integrationStatus",
143-
"response-latency": "$context.responseLatency",
144-
"status": "$context.status"
145-
}
135+
Format: !Join
136+
- ""
137+
- - '{"requestId":"$context.requestId",'
138+
- '"integration-error":"$context.integration.error",'
139+
- '"integration-status":"$context.integration.status",'
140+
- '"integration-latency":"$context.integration.latency",'
141+
- '"integration-requestId":"$context.integration.requestId",'
142+
- '"integration-integrationStatus":"$context.integration.integrationStatus",'
143+
- '"response-latency":"$context.responseLatency",'
144+
- '"status":"$context.status"}'
146145
DefinitionBody: !Transform
147146
Name: "AWS::Include"
148147
Parameters:

Unicorn.Properties/PropertiesService.Tests/events/EventBridge/publication_approval_requested_event.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@
1919
"Contract": "sale",
2020
"ListPrice": 200,
2121
"Currency": "SPL",
22-
"images": [
23-
"prop1_exterior1.jpg",
24-
"prop1_interior1.jpg",
25-
"prop1_interior2.jpg",
26-
"prop1_interior3.jpg",
27-
"prop1_interior4-bad.jpg"
22+
"Images": [
23+
"property_images/prop1_exterior1.jpg",
24+
"property_images/prop1_interior1.jpg",
25+
"property_images/prop1_interior2.jpg",
26+
"property_images/prop1_interior3.jpg",
27+
"property_images/prop1_interior4-bad.jpg"
2828
]
2929
}
3030
}

Unicorn.Properties/PropertiesService.Tests/events/EventBridge/publicaction_approval_requested_event_all_good.json renamed to Unicorn.Properties/PropertiesService.Tests/events/EventBridge/publication_approval_requested_event_all_good.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
"DetailType": "PublicationApprovalRequested",
44
"Source": "unicorn.web",
55
"EventBusName": "UnicornPropertiesBus-local",
6-
"Detail": "{\"PropertyId\":\"usa/anytown/main-street/222\",\"Address\":{\"Country\":\"USA\",\"City\":\"Anytown\",\"Street\":\"Main Street\",\"Number\":222},\"Description\":\"This classic Anytown estate comes with a covetable lake view. The romantic and comfortable backyard is the perfect setting for unicorn get-togethers. The open concept Main Stable is fully equipped with all the desired amenities. Second floor features 6 straw bales including large Rainbow Suite with private training pool terrace and Jr Sparkles Suite.\",\"Contract\":\"sale\",\"ListPrice\":200,\"Currency\":\"SPL\",\"images\":[\"prop1_exterior1.jpg\",\"prop1_interior1.jpg\",\"prop1_interior2.jpg\",\"prop1_interior3.jpg\"]}"
6+
"Detail": "{\"PropertyId\":\"usa/anytown/main-street/222\",\"Address\":{\"Country\":\"USA\",\"City\":\"Anytown\",\"Street\":\"Main Street\",\"Number\":222},\"Description\":\"This classic Anytown estate comes with a covetable lake view. The romantic and comfortable backyard is the perfect setting for unicorn get-togethers. The open concept Main Stable is fully equipped with all the desired amenities. Second floor features 6 straw bales including large Rainbow Suite with private training pool terrace and Jr Sparkles Suite.\",\"Contract\":\"sale\",\"ListPrice\":200,\"Currency\":\"SPL\",\"Images\":[\"property_images/prop1_exterior1.jpg\",\"property_images/prop1_interior1.jpg\",\"property_images/prop1_interior2.jpg\",\"property_images/prop1_interior3.jpg\"]}"
77
}
88
]

Unicorn.Properties/PropertiesService.Tests/events/EventBridge/publicaction_approval_requested_event_inappropriate_description.json renamed to Unicorn.Properties/PropertiesService.Tests/events/EventBridge/publication_approval_requested_event_inappropriate_description.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
"DetailType": "PublicationApprovalRequested",
44
"Source": "unicorn.web",
55
"EventBusName": "UnicornPropertiesBus-local",
6-
"Detail": "{\"PropertyId\":\"usa/anytown/main-street/111\",\"Address\":{\"Country\":\"USA\",\"City\":\"Anytown\",\"Street\":\"Main Street\",\"Number\":111},\"Description\":\"This is a property for goblins. The property has the worst quality and is atrocious when it comes to design. The property is not clean whatsoever, and will make any property owner have buyers' remorse as soon the property is bought. Keep away from this property as much as possible!\",\"Contract\":\"sale\",\"ListPrice\":200,\"Currency\":\"SPL\",\"images\":[\"prop1_exterior1.jpg\",\"prop1_interior1.jpg\",\"prop1_interior2.jpg\",\"prop1_interior3.jpg\"]}"
6+
"Detail": "{\"PropertyId\":\"usa/anytown/main-street/111\",\"Address\":{\"Country\":\"USA\",\"City\":\"Anytown\",\"Street\":\"Main Street\",\"Number\":111},\"Description\":\"This is a property for goblins. The property has the worst quality and is atrocious when it comes to design. The property is not clean whatsoever, and will make any property owner have buyers' remorse as soon the property is bought. Keep away from this property as much as possible!\",\"Contract\":\"sale\",\"ListPrice\":200,\"Currency\":\"SPL\",\"Images\":[\"property_images/prop1_exterior1.jpg\",\"property_images/prop1_interior1.jpg\",\"property_images/prop1_interior2.jpg\",\"property_images/prop1_interior3.jpg\"]}"
77
}
88
]

Unicorn.Properties/PropertiesService.Tests/events/EventBridge/publicaction_approval_requested_event_inappropriate_images.json renamed to Unicorn.Properties/PropertiesService.Tests/events/EventBridge/publication_approval_requested_event_inappropriate_images.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
"DetailType": "PublicationApprovalRequested",
44
"Source": "unicorn.web",
55
"EventBusName": "UnicornPropertiesBus-local",
6-
"Detail": "{\"PropertyId\":\"usa/anytown/main-street/111\",\"Address\":{\"Country\":\"USA\",\"City\":\"Anytown\",\"Street\":\"Main Street\",\"Number\":111},\"Description\":\"This classic Anytown estate comes with a covetable lake view. The romantic and comfortable backyard is the perfect setting for unicorn get-togethers. The open concept Main Stable is fully equipped with all the desired amenities. Second floor features 6 straw bales including large Rainbow Suite with private training pool terrace and Jr Sparkles Suite.\",\"Contract\":\"sale\",\"ListPrice\":200,\"Currency\":\"SPL\",\"images\":[\"prop1_exterior1.jpg\",\"prop1_interior1.jpg\",\"prop1_interior2.jpg\",\"prop1_interior3.jpg\",\"prop1_interior4-bad.jpg\"]}"
6+
"Detail": "{\"PropertyId\":\"usa/anytown/main-street/111\",\"Address\":{\"Country\":\"USA\",\"City\":\"Anytown\",\"Street\":\"Main Street\",\"Number\":111},\"Description\":\"This classic Anytown estate comes with a covetable lake view. The romantic and comfortable backyard is the perfect setting for unicorn get-togethers. The open concept Main Stable is fully equipped with all the desired amenities. Second floor features 6 straw bales including large Rainbow Suite with private training pool terrace and Jr Sparkles Suite.\",\"Contract\":\"sale\",\"ListPrice\":200,\"Currency\":\"SPL\",\"Images\":[\"property_images/prop1_exterior1.jpg\",\"property_images/prop1_interior1.jpg\",\"property_images/prop1_interior2.jpg\",\"property_images/prop1_interior3.jpg\",\"property_images/prop1_interior4-bad.jpg\"]}"
77
}
88
]

Unicorn.Properties/PropertiesService.Tests/events/EventBridge/publicaction_approval_requested_event_non_existing_contract.json renamed to Unicorn.Properties/PropertiesService.Tests/events/EventBridge/publication_approval_requested_event_non_existing_contract.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
"DetailType": "PublicationApprovalRequested",
44
"Source": "unicorn.web",
55
"EventBusName": "UnicornPropertiesBus-local",
6-
"Detail": "{\"PropertyId\":\"usa/anytown/main-street/333\",\"Address\":{\"Country\":\"USA\",\"City\":\"Anytown\",\"Street\":\"Main Street\",\"Number\":333},\"Description\":\"This classic Anytown estate comes with a covetable lake view. The romantic and comfortable backyard is the perfect setting for unicorn get-togethers. The open concept Main Stable is fully equipped with all the desired amenities. Second floor features 6 straw bales including large Rainbow Suite with private training pool terrace and Jr Sparkles Suite.\",\"Contract\":\"sale\",\"ListPrice\":200,\"Currency\":\"SPL\",\"images\":[\"prop1_exterior1.jpg\",\"prop1_interior1.jpg\",\"prop1_interior2.jpg\",\"prop1_interior3.jpg\"]}"
6+
"Detail": "{\"PropertyId\":\"usa/anytown/main-street/333\",\"Address\":{\"Country\":\"USA\",\"City\":\"Anytown\",\"Street\":\"Main Street\",\"Number\":333},\"Description\":\"This classic Anytown estate comes with a covetable lake view. The romantic and comfortable backyard is the perfect setting for unicorn get-togethers. The open concept Main Stable is fully equipped with all the desired amenities. Second floor features 6 straw bales including large Rainbow Suite with private training pool terrace and Jr Sparkles Suite.\",\"Contract\":\"sale\",\"ListPrice\":200,\"Currency\":\"SPL\",\"Images\":[\"property_images/prop1_exterior1.jpg\",\"property_images/prop1_interior1.jpg\",\"property_images/prop1_interior2.jpg\",\"property_images/prop1_interior3.jpg\"]}"
77
}
88
]

Unicorn.Properties/PropertiesService.Tests/events/EventBridge/publicaction_approval_requested_event_pause_workflow.json renamed to Unicorn.Properties/PropertiesService.Tests/events/EventBridge/publication_approval_requested_event_pause_workflow.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
"DetailType": "PublicationApprovalRequested",
44
"Source": "unicorn.web",
55
"EventBusName": "UnicornPropertiesBus-local",
6-
"Detail": "{\"PropertyId\":\"usa/anytown/main-street/111\",\"Address\":{\"Country\":\"USA\",\"City\":\"Anytown\",\"Street\":\"Main Street\",\"Number\":111},\"Description\":\"This classic Anytown estate comes with a covetable lake view. The romantic and comfortable backyard is the perfect setting for unicorn get-togethers. The open concept Main Stable is fully equipped with all the desired amenities. Second floor features 6 straw bales including large Rainbow Suite with private training pool terrace and Jr Sparkles Suite.\",\"Contract\":\"sale\",\"ListPrice\":200,\"Currency\":\"SPL\",\"images\":[\"prop1_exterior1.jpg\",\"prop1_interior1.jpg\",\"prop1_interior2.jpg\",\"prop1_interior3.jpg\"]}"
6+
"Detail": "{\"PropertyId\":\"usa/anytown/main-street/111\",\"Address\":{\"Country\":\"USA\",\"City\":\"Anytown\",\"Street\":\"Main Street\",\"Number\":111},\"Description\":\"This classic Anytown estate comes with a covetable lake view. The romantic and comfortable backyard is the perfect setting for unicorn get-togethers. The open concept Main Stable is fully equipped with all the desired amenities. Second floor features 6 straw bales including large Rainbow Suite with private training pool terrace and Jr Sparkles Suite.\",\"Contract\":\"sale\",\"ListPrice\":200,\"Currency\":\"SPL\",\"Images\":[\"property_images/prop1_exterior1.jpg\",\"property_images/prop1_interior1.jpg\",\"property_images/prop1_interior2.jpg\",\"property_images/prop1_interior3.jpg\"]}"
77
}
88
]

Unicorn.Properties/PropertiesService.Tests/events/EventBridge/put_event_property_approval_requested.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[
22
{
33
"Source": "unicorn.web",
4-
"Detail": "{ \"PropertyId\": \"usa/anytown/main-street/123\", \"Country\": \"USA\", \"City\": \"Anytown\", \"Street\": \"Main Street\", \"Number\": 123, \"Description\": \"This classic Anytown estate comes with a covetable lake view. The romantic and comfortable backyard is the perfect setting for unicorn get-togethers. The open concept Main Stable is fully equipped with all the desired amenities. Second floor features 6 straw bales including large Rainbow Suite with private training pool terrace and Jr Sparkles Suite.\", \"Contract\": \"sale\", \"ListPrice\": 200, \"Currency\": \"SPL\", \"images\": [ \"prop1_exterior1.jpg\", \"prop1_interior1.jpg\", \"prop1_interior2.jpg\", \"prop1_interior3.jpg\", \"prop1_interior4-bad.jpg\" ] }",
4+
"Detail": "{ \"PropertyId\": \"usa/anytown/main-street/123\", \"Country\": \"USA\", \"City\": \"Anytown\", \"Street\": \"Main Street\", \"Number\": 123, \"Description\": \"This classic Anytown estate comes with a covetable lake view. The romantic and comfortable backyard is the perfect setting for unicorn get-togethers. The open concept Main Stable is fully equipped with all the desired amenities. Second floor features 6 straw bales including large Rainbow Suite with private training pool terrace and Jr Sparkles Suite.\", \"Contract\": \"sale\", \"ListPrice\": 200, \"Currency\": \"SPL\", \"Images\": [ \"property_images/prop1_exterior1.jpg\", \"property_images/prop1_interior1.jpg\", \"property_images/prop1_interior2.jpg\", \"property_images/prop1_interior3.jpg\", \"property_images/prop1_interior4-bad.jpg\" ] }",
55
"DetailType": "PublicationApprovalRequested",
66
"EventBusName": "UnicornPropertiesBus-local"
77
}

0 commit comments

Comments
 (0)