Skip to content

Commit 9a22b8a

Browse files
Fix hosted service syntax: use correct brace/bracket format
1 parent 551255d commit 9a22b8a

File tree

1 file changed

+16
-7
lines changed
  • showcases/data/Lambda/Activator - Hosted service

1 file changed

+16
-7
lines changed

showcases/data/Lambda/Activator - Hosted service/code.pure

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ function model::processData(data: String[1]): String[1]
1515
HostedService model::BasicHostedService
1616
{
1717
pattern: '/api/greet/{name}';
18-
ownership: UserList [users: ['user1', 'user2']];
18+
ownership: UserList
19+
{
20+
users: ['user1', 'user2']
21+
};
1922
function: model::greet(String[1]):String[1];
2023
documentation: 'A simple hosted service that greets users by name';
2124
autoActivateUpdates: true;
@@ -25,7 +28,10 @@ HostedService model::BasicHostedService
2528
HostedService <<meta::pure::profiles::doc.doc>> {doc.doc='Example with deployment ownership'} model::DeploymentHostedService
2629
{
2730
pattern: '/api/process/{data}';
28-
ownership: Deployment [identifier: '12345'];
31+
ownership: Deployment
32+
{
33+
identifier: '12345'
34+
};
2935
function: model::processData(String[1]):String[1];
3036
documentation: 'A hosted service that processes data with deployment ownership';
3137
autoActivateUpdates: false;
@@ -35,16 +41,19 @@ HostedService <<meta::pure::profiles::doc.doc>> {doc.doc='Example with deploymen
3541
HostedService model::AdvancedHostedService
3642
{
3743
pattern: '/api/advanced/{param}';
38-
ownership: UserList [users: ['admin']];
44+
ownership: UserList
45+
{
46+
users: ['admin']
47+
};
3948
function: model::processData(String[1]):String[1];
4049
documentation: 'Advanced hosted service with post-deployment actions';
4150
autoActivateUpdates: true;
4251
actions:
43-
[
52+
{
4453
SlackNotify
45-
[
54+
{
4655
channel: '#deployments';
4756
message: 'Hosted service has been deployed';
48-
]
49-
]
57+
}
58+
}
5059
}

0 commit comments

Comments
 (0)