Skip to content

Commit b665031

Browse files
Fix hosted service syntax: simplify structure and remove newlines
1 parent b10e2df commit b665031

File tree

1 file changed

+3
-13
lines changed
  • showcases/data/Lambda/Activator - Hosted service

1 file changed

+3
-13
lines changed

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

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,7 @@ function model::processData(data: String[1]): String[1]
1515
HostedService model::BasicHostedService
1616
{
1717
pattern: '/api/greet/{name}';
18-
ownership: UserList
19-
{
20-
users: ['user1', 'user2']
21-
};
18+
ownership: UserList { users: ['user1', 'user2'] };
2219
function: model::greet(String[1]):String[1];
2320
documentation: 'A simple hosted service that greets users by name';
2421
autoActivateUpdates: true;
@@ -28,10 +25,7 @@ HostedService model::BasicHostedService
2825
HostedService <<meta::pure::profiles::doc.doc>> {doc.doc='Example with deployment ownership'} model::DeploymentHostedService
2926
{
3027
pattern: '/api/process/{data}';
31-
ownership: Deployment
32-
{
33-
identifier: '12345'
34-
};
28+
ownership: Deployment { identifier: '12345' };
3529
function: model::processData(String[1]):String[1];
3630
documentation: 'A hosted service that processes data with deployment ownership';
3731
autoActivateUpdates: false;
@@ -41,12 +35,8 @@ HostedService <<meta::pure::profiles::doc.doc>> {doc.doc='Example with deploymen
4135
HostedService model::AdvancedHostedService
4236
{
4337
pattern: '/api/advanced/{param}';
44-
ownership: UserList
45-
{
46-
users: ['admin']
47-
};
38+
ownership: UserList { users: ['admin'] };
4839
function: model::processData(String[1]):String[1];
4940
documentation: 'Advanced hosted service with post-deployment actions';
5041
autoActivateUpdates: true;
51-
5242
}

0 commit comments

Comments
 (0)