|
2 | 2 | // Define a simple function to be used by our hosted service |
3 | 3 | function model::greet(name: String[1]): String[1] |
4 | 4 | { |
5 | | - 'Hello, ' + $name + '! Welcome to the hosted service.' |
| 5 | + "Hello, " + $name + "! Welcome to the hosted service." |
6 | 6 | } |
7 | 7 |
|
8 | 8 | function model::processData(data: String[1]): String[1] |
9 | 9 | { |
10 | | - 'Processed data: ' + $data |
| 10 | + "Processed data: " + $data |
11 | 11 | } |
12 | 12 |
|
13 | 13 | ###HostedService |
14 | 14 | // Basic hosted service with UserList ownership |
15 | 15 | HostedService model::BasicHostedService |
16 | 16 | { |
17 | | - pattern: '/api/greet/{name}'; |
| 17 | + pattern: "/api/greet/{name}"; |
18 | 18 | ownership: UserList { users: [ |
19 | | - 'user1', |
20 | | - 'user2' |
| 19 | + "user1", |
| 20 | + "user2" |
21 | 21 | ] }; |
22 | 22 | function: model::greet(String[1]):String[1]; |
23 | | - documentation: 'A simple hosted service that greets users by name'; |
| 23 | + documentation: "A simple hosted service that greets users by name"; |
24 | 24 | autoActivateUpdates: true; |
25 | 25 | } |
26 | 26 |
|
27 | 27 | // Hosted service with Deployment ownership and stereotypes |
28 | | -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 |
29 | 29 | { |
30 | | - pattern: '/api/process/{data}'; |
31 | | - ownership: Deployment { identifier: '12345' }; |
| 30 | + pattern: "/api/process/{data}"; |
| 31 | + ownership: Deployment { identifier: "12345" }; |
32 | 32 | function: model::processData(String[1]):String[1]; |
33 | | - documentation: 'A hosted service that processes data with deployment ownership'; |
| 33 | + documentation: "A hosted service that processes data with deployment ownership"; |
34 | 34 | autoActivateUpdates: false; |
35 | 35 | } |
36 | 36 |
|
37 | 37 | // Hosted service with post-deployment actions |
38 | 38 | HostedService model::AdvancedHostedService |
39 | 39 | { |
40 | | - pattern: '/api/advanced/{param}'; |
| 40 | + pattern: "/api/advanced/{param}"; |
41 | 41 | ownership: UserList { users: [ |
42 | | - 'admin' |
| 42 | + "admin" |
43 | 43 | ] }; |
44 | 44 | function: model::processData(String[1]):String[1]; |
45 | | - documentation: 'Advanced hosted service with post-deployment actions'; |
| 45 | + documentation: "Advanced hosted service with post-deployment actions"; |
46 | 46 | autoActivateUpdates: true; |
47 | 47 | } |
0 commit comments