Skip to content

Commit e42d4e8

Browse files
committed
feat: implements jsonata workflow, replaces YAML SAM Config with TOML, removes AWS::LanguageExtensions
1 parent 1041f59 commit e42d4e8

23 files changed

+292
-557
lines changed

unicorn_contracts/samconfig.toml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
version = 0.1
2+
3+
[default.global.parameters]
4+
stack_name = "uni-prop-local-contracts"
5+
s3_prefix = "uni-prop-local-contracts"
6+
resolve_s3 = true
7+
resolve_image_repositories = true
8+
9+
[default.build.parameters]
10+
cached = true
11+
parallel = true
12+
13+
[default.deploy.parameters]
14+
disable_rollback = true
15+
confirm_changeset = false
16+
fail_on_empty_changeset = false
17+
capabilities = ["CAPABILITY_IAM", "CAPABILITY_AUTO_EXPAND"]
18+
parameter_overrides = ["Stage=local"]
19+
20+
[default.validate.parameters]
21+
lint = true
22+
23+
[default.sync.parameters]
24+
watch = true
25+
26+
[default.local_start_api.parameters]
27+
warm_containers = "EAGER"
28+
29+
[default.local_start_lambda.parameters]
30+
warm_containers = "EAGER"

unicorn_contracts/samconfig.yaml

Lines changed: 0 additions & 35 deletions
This file was deleted.

unicorn_contracts/template.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
# SPDX-License-Identifier: MIT-0
33
AWSTemplateFormatVersion: "2010-09-09"
44
Transform:
5-
- AWS::LanguageExtensions
65
- AWS::Serverless-2016-10-31
76
Description: >
87
Unicorn Contracts Service. Manage contract information for property listings.
@@ -132,15 +131,16 @@ Resources:
132131
ThrottlingRateLimit: 100
133132
AccessLogSetting:
134133
DestinationArn: !GetAtt UnicornContractsApiLogGroup.Arn
135-
Format: !ToJsonString
136-
requestId: $context.requestId
137-
integration-error: $context.integration.error
138-
integration-status: $context.integration.status
139-
integration-latency: $context.integration.latency
140-
integration-requestId: $context.integration.requestId
141-
integration-integrationStatus: $context.integration.integrationStatus
142-
response-latency: $context.responseLatency
143-
status: $context.status
134+
Format: !Join
135+
- ""
136+
- - '{"requestId":"$context.requestId",'
137+
- '"integration-error":"$context.integration.error",'
138+
- '"integration-status":"$context.integration.status",'
139+
- '"integration-latency":"$context.integration.latency",'
140+
- '"integration-requestId":"$context.integration.requestId",'
141+
- '"integration-integrationStatus":"$context.integration.integrationStatus",'
142+
- '"response-latency":"$context.responseLatency",'
143+
- '"status":"$context.status"}'
144144
DefinitionBody: !Transform
145145
Name: "AWS::Include"
146146
Parameters:

unicorn_properties/PropertyFunctions/src/main/java/properties/ContractExistsCheckerFunction.java

Lines changed: 0 additions & 87 deletions
This file was deleted.

unicorn_properties/PropertyFunctions/src/main/java/properties/ValidateContentIntegrityFunction.java

Lines changed: 0 additions & 64 deletions
This file was deleted.

unicorn_properties/PropertyFunctions/src/test/events/eventbridge/publication_approval_requested_event.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@
2020
"listprice": 200,
2121
"currency": "SPL",
2222
"images": [
23-
"prop1_exterior1.jpg",
24-
"prop1_interior1.jpg",
25-
"prop1_interior2.jpg",
26-
"prop1_interior3.jpg",
27-
"prop1_interior4-bad.jpg"
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/PropertyFunctions/src/test/events/eventbridge/publicaction_approval_requested_event_all_good.json renamed to unicorn_properties/PropertyFunctions/src/test/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.properties.web",
55
"EventBusName": "UnicornPropertiesEventBus-Local",
6-
"Detail": "{\"property_id\":\"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": "{\"property_id\":\"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/PropertyFunctions/src/test/events/eventbridge/publicaction_approval_requested_event_inappropriate_description.json renamed to unicorn_properties/PropertyFunctions/src/test/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.properties.web",
55
"EventBusName": "UnicornPropertiesEventBus-Local",
6-
"Detail": "{\"property_id\":\"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": "{\"property_id\":\"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/PropertyFunctions/src/test/events/eventbridge/publicaction_approval_requested_event_inappropriate_images.json renamed to unicorn_properties/PropertyFunctions/src/test/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.properties.web",
55
"EventBusName": "UnicornPropertiesEventBus-Local",
6-
"Detail": "{\"property_id\":\"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": "{\"property_id\":\"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/PropertyFunctions/src/test/events/eventbridge/publicaction_approval_requested_event_non_existing_contract.json renamed to unicorn_properties/PropertyFunctions/src/test/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.properties.web",
55
"EventBusName": "UnicornPropertiesEventBus-Local",
6-
"Detail": "{\"property_id\":\"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": "{\"property_id\":\"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
]

0 commit comments

Comments
 (0)