Resource Dictionary: fecthing data-type list
[ccsdk/cds.git] / cds-ui / server / src / datasources / resource-dictionary.datasource-template.ts
1 import {controllerApiConfig} from '../config/app-config';
2
3 export default {
4     "name": "resourceDictionary",
5     "connector": "rest",
6     "baseURL": controllerApiConfig.http.url + "/dictionary",
7     "crud": false,
8     "debug": true,
9     "operations": [{
10             "template": {
11                 "method": "GET",
12                 "url": controllerApiConfig.http.url + "/dictionary/{name}",
13                 "headers": {
14                     "accepts": "application/json",
15                     "content-type": "application/json",
16                     "authorization": controllerApiConfig.http.authToken
17                 },
18                 "responsePath": "$.*"
19             },
20             "functions": {
21                 "getByName": ["name"]
22
23             }
24         },
25         {
26             "template": {
27                 "method": "GET",
28                 "url": controllerApiConfig.http.url + "/dictionary/source-mapping",
29                 "headers": {
30                     "accepts": "application/json",
31                     "content-type": "application/json",
32                     "authorization": controllerApiConfig.http.authToken
33                 },
34                 "responsePath": "$.*"
35             },
36             "functions": {
37                 "getSourceMapping": []
38
39             }
40         },
41         {
42             "template": {
43                 "method": "GET",
44                 "url": controllerApiConfig.http.url + "/dictionary/search/{tags}",
45                 "headers": {
46                     "accepts": "application/json",
47                     "content-type": "application/json",
48                     "authorization": controllerApiConfig.http.authToken
49                 },
50                 "responsePath": "$.*"
51             },
52             "functions": {
53                 "getByTags": ["tags"]
54
55             }
56         },
57         {
58             "template": {
59                 "method": "POST",
60                 "url": controllerApiConfig.http.url + "/dictionary",
61                 "headers": {
62                     "accepts": "application/json",
63                     "content-type": "application/json",
64                     "authorization": controllerApiConfig.http.authToken
65                 },
66                 "body": "{resourceDictionary}",
67                 "responsePath": "$.*"
68             },
69             "functions": {
70                 "save": ["resourceDictionary"]
71
72             }
73         },
74         {
75             "template": {
76                 "method": "POST",
77                 "url": controllerApiConfig.http.url + "/dictionary/by-names",
78                 "headers": {
79                     "accepts": "application/json",
80                     "content-type": "application/json",
81                     "authorization": controllerApiConfig.http.authToken
82                 },
83                 "body": "{resourceDictionaryList}",
84                 "responsePath": "$.*"
85             },
86             "functions": {
87                 "searchbyNames": ["resourceDictionaryList"]
88
89             }
90         },
91         {
92             "template": {
93                 "method": "GET",
94                 "url": controllerApiConfig.http.url + "/model-type/{source}",
95                 "headers": {
96                     "accepts": "application/json",
97                     "content-type": "application/json",
98                     "authorization": controllerApiConfig.http.authToken
99                 },
100                 "responsePath": "$.*"
101             },
102             "functions": {
103                 "getModelType": ["source"]
104
105             }
106         },
107         {
108             "template": {
109                 "method": "GET",
110                 "url": controllerApiConfig.http.url + "/model-type/by-definition/data_type",
111                 "headers": {
112                     "accepts": "application/json",
113                     "content-type": "application/json",
114                     "authorization": controllerApiConfig.http.authToken
115                 },
116                 "responsePath": "$.*"
117             },
118             "functions": {
119                 "getDataTypes": []
120
121             }
122         }
123     ]
124 };