File tree 5 files changed +50
-14
lines changed
5 files changed +50
-14
lines changed Original file line number Diff line number Diff line change @@ -10,20 +10,22 @@ using {
10
10
11
11
type Pronoun : Association to Pronouns ;
12
12
13
- @ Core . Description : ' Preferred gender pronoun list '
13
+ @ description : ' Preferred gender pronoun list '
14
14
define entity Pronouns : sap .common .CodeList {
15
15
key code : String(2) @ (title : ' Pronoun Code ' );
16
16
}
17
17
18
- @ Core . Description : ' Student list includes sensitive/personal data '
18
+ @ description : ' Student list includes sensitive/personal data '
19
19
define entity Students : cuid , managed {
20
20
pronoun : Pronoun ;
21
21
internalID : Integer ;
22
- name : String ;
23
- lastname : String ;
22
+ name : String not null ;
23
+ lastname : String not null ;
24
24
birthdate : Date ;
25
25
nationality : Country ;
26
26
phonenumber : String ;
27
- email : String ;
27
+ email : String
28
+ @ assert . format : ' ^\w+@[a-zA-Z_]+?\.[a-zA-Z]{2,3}$ '
29
+ not null ;
28
30
}
29
31
Original file line number Diff line number Diff line change 16
16
"dependencies" : {
17
17
"@sap/audit-logging" : " ^3.2.0" ,
18
18
"@sap/cds" : " ^4" ,
19
- "@sap/cds-odata-v2-adapter-proxy" : " ^1.4.48 " ,
19
+ "@sap/cds-odata-v2-adapter-proxy" : " ^1.4.50 " ,
20
20
"@sap/xsenv" : " ^3.0.0" ,
21
- "@sap/xssec" : " ^3.0.10 " ,
21
+ "@sap/xssec" : " ^3" ,
22
22
"express" : " ^4" ,
23
23
"passport" : " ^0.4.1"
24
24
},
Original file line number Diff line number Diff line change 1
1
using { cap .auditlog .germancourse as db } from ' ../db/model' ;
2
2
3
- service admin @ (requires : ' authenticated-user ' ){
3
+ service admin @ (_requires : ' authenticated-user ' ){
4
4
entity Students as projection on db .Students ;
5
5
}
6
6
Original file line number Diff line number Diff line change
1
+ @server = http://localhost:4004
2
+
3
+ ### ------------------------------------------------------------------------
4
+ # Get service info
5
+ GET {{server }}/browse
6
+
7
+ ### ------------------------------------------------------------------------
8
+ # Get $metadata document
9
+ GET {{server }}/browse/$metadata
10
+
11
+ ### ------------------------------------------------------------------------
12
+ # Browse Students as any user
13
+ GET {{server }}/browse/Students?
14
+ & $select = name,lastname
15
+ & $expand = pronoun
16
+ & sap-language = de
17
+
18
+ ### ------------------------------------------------------------------------
19
+ # Fetch Students as admin
20
+ GET {{server }}/admin/Students?
21
+ Authorization: Basic admin:admin
22
+
23
+ ### ------------------------------------------------------------------------
24
+ # Create Students
25
+ POST {{server }}/admin/Students
26
+ Content-Type: application/json;IEEE754Compatible=true
27
+
28
+ {
29
+ "name" : " steven" ,
30
+ "lastname" : " smith" ,
31
+ "email" : " mail@mail.com"
32
+
33
+ }
34
+
You canβt perform that action at this time.
0 commit comments