Skip to content

Commit 60df84f

Browse files
Fix hosted service ownership syntax
1 parent 4c6993d commit 60df84f

File tree

1 file changed

+8
-17
lines changed
  • showcases/data/Lambda/Activator - Hosted service

1 file changed

+8
-17
lines changed

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

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,10 @@ function model::processData(data: String[1]): String[1]
1515
HostedService model::BasicHostedService
1616
{
1717
pattern: '/api/greet/{name}';
18-
ownership: UserList
19-
{
20-
users: [
21-
'user1',
22-
'user2'
23-
]
24-
};
18+
ownership: UserList { users: [
19+
'user1',
20+
'user2'
21+
] };
2522
function: model::greet(String[1]):String[1];
2623
documentation: 'A simple hosted service that greets users by name';
2724
autoActivateUpdates: true;
@@ -31,10 +28,7 @@ HostedService model::BasicHostedService
3128
HostedService <<meta::pure::profiles::doc.doc>> {doc.doc = 'Example with deployment ownership'} model::DeploymentHostedService
3229
{
3330
pattern: '/api/process/{data}';
34-
ownership: Deployment
35-
{
36-
identifier: '12345'
37-
};
31+
ownership: Deployment { identifier: '12345' };
3832
function: model::processData(String[1]):String[1];
3933
documentation: 'A hosted service that processes data with deployment ownership';
4034
autoActivateUpdates: false;
@@ -44,12 +38,9 @@ HostedService <<meta::pure::profiles::doc.doc>> {doc.doc = 'Example with deploym
4438
HostedService model::AdvancedHostedService
4539
{
4640
pattern: '/api/advanced/{param}';
47-
ownership: UserList
48-
{
49-
users: [
50-
'admin'
51-
]
52-
};
41+
ownership: UserList { users: [
42+
'admin'
43+
] };
5344
function: model::processData(String[1]):String[1];
5445
documentation: 'Advanced hosted service with post-deployment actions';
5546
autoActivateUpdates: true;

0 commit comments

Comments
 (0)