Skip to content

Commit 87c2fb2

Browse files
Fix hosted service syntax: match exact spacing and formatting requirements
1 parent 8791062 commit 87c2fb2

File tree

1 file changed

+15
-29
lines changed
  • showcases/data/Lambda/Activator - Hosted service

1 file changed

+15
-29
lines changed

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

Lines changed: 15 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -14,43 +14,29 @@ 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
19-
{
20-
users: [
21-
'user1',
22-
'user2'
23-
]
24-
};
25-
function: model::greet(String[1]):String[1];
26-
documentation: 'A simple hosted service that greets users by name';
27-
autoActivateUpdates: true;
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;
2822
}
2923

3024
// Hosted service with Deployment ownership and stereotypes
3125
HostedService <<meta::pure::profiles::doc.doc>> {doc.doc = 'Example with deployment ownership'} model::DeploymentHostedService
3226
{
33-
pattern: '/api/process/{data}';
34-
ownership: Deployment
35-
{
36-
identifier: '12345'
37-
};
38-
function: model::processData(String[1]):String[1];
39-
documentation: 'A hosted service that processes data with deployment ownership';
40-
autoActivateUpdates: false;
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;
4132
}
4233

4334
// Hosted service with post-deployment actions
4435
HostedService model::AdvancedHostedService
4536
{
46-
pattern: '/api/advanced/{param}';
47-
ownership: UserList
48-
{
49-
users: [
50-
'admin'
51-
]
52-
};
53-
function: model::processData(String[1]):String[1];
54-
documentation: 'Advanced hosted service with post-deployment actions';
55-
autoActivateUpdates: true;
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;
5642
}

0 commit comments

Comments
 (0)