Skip to content

Commit c1ba06f

Browse files
Fix hosted service syntax: match expected format with spaces before colons and array elements on separate lines
1 parent b665031 commit c1ba06f

File tree

1 file changed

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

1 file changed

+21
-16
lines changed

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

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,29 +14,34 @@ function model::processData(data: String[1]): String[1]
1414
// Basic hosted service with UserList ownership
1515
HostedService model::BasicHostedService
1616
{
17-
pattern: '/api/greet/{name}';
18-
ownership: UserList { users: ['user1', 'user2'] };
19-
function: model::greet(String[1]):String[1];
20-
documentation: 'A simple hosted service that greets users by name';
21-
autoActivateUpdates: true;
17+
pattern : '/api/greet/{name}';
18+
ownership : UserList { users: [
19+
'user1',
20+
'user2'
21+
] };
22+
function : model::greet(String[1]):String[1];
23+
documentation : 'A simple hosted service that greets users by name';
24+
autoActivateUpdates : true;
2225
}
2326

2427
// Hosted service with Deployment ownership and stereotypes
25-
HostedService <<meta::pure::profiles::doc.doc>> {doc.doc='Example with deployment ownership'} model::DeploymentHostedService
28+
HostedService <<meta::pure::profiles::doc.doc>> {doc.doc = 'Example with deployment ownership'} model::DeploymentHostedService
2629
{
27-
pattern: '/api/process/{data}';
28-
ownership: Deployment { identifier: '12345' };
29-
function: model::processData(String[1]):String[1];
30-
documentation: 'A hosted service that processes data with deployment ownership';
31-
autoActivateUpdates: false;
30+
pattern : '/api/process/{data}';
31+
ownership : Deployment { identifier: '12345' };
32+
function : model::processData(String[1]):String[1];
33+
documentation : 'A hosted service that processes data with deployment ownership';
34+
autoActivateUpdates : false;
3235
}
3336

3437
// Hosted service with post-deployment actions
3538
HostedService model::AdvancedHostedService
3639
{
37-
pattern: '/api/advanced/{param}';
38-
ownership: UserList { users: ['admin'] };
39-
function: model::processData(String[1]):String[1];
40-
documentation: 'Advanced hosted service with post-deployment actions';
41-
autoActivateUpdates: true;
40+
pattern : '/api/advanced/{param}';
41+
ownership : UserList { users: [
42+
'admin'
43+
] };
44+
function : model::processData(String[1]):String[1];
45+
documentation : 'Advanced hosted service with post-deployment actions';
46+
autoActivateUpdates : true;
4247
}

0 commit comments

Comments
 (0)