@@ -286,7 +286,7 @@ service CatalogService {
286
286
const csn = cds . compile . to . csn ( `
287
287
service A {entity E { key ID : UUID; };};`
288
288
) ;
289
- const openapi = toOpenApi ( csn , { 'openapi:config-file' : path . resolve ( "./test/lib/compile/ data/configFile.json") } ) ;
289
+ const openapi = toOpenApi ( csn , { 'openapi:config-file' : path . resolve ( __dirname , " data/configFile.json") } ) ;
290
290
expect ( openapi . servers ) . toBeTruthy ( ) ;
291
291
expect ( openapi ) . toMatchObject ( { servers : [ { url : 'http://foo.bar:8080' } , { url : "http://foo.bar:8080/a/foo" } ] } ) ;
292
292
expect ( openapi . info . description ) . toMatch ( / y u m l .* d i a g r a m / i) ;
@@ -298,7 +298,7 @@ service CatalogService {
298
298
@title:'It is located at http://example.com:8080' service A {entity E { key ID : UUID;};};`
299
299
) ;
300
300
const options = {
301
- 'openapi:config-file' : path . resolve ( "./test/lib/compile/ data/configFile.json") ,
301
+ 'openapi:config-file' : path . resolve ( __dirname , " data/configFile.json") ,
302
302
'openapi:url' : "http://example.com:8080" ,
303
303
'odata-version' : '4.0' ,
304
304
'openapi:diagram' : "false"
@@ -398,9 +398,9 @@ service CatalogService {
398
398
const csn = cds . compile . to . csn ( `
399
399
namespace sap.odm.test;
400
400
service A {
401
- entity E1 {
402
- key id: String(4);
403
- oid: String(128);
401
+ entity E1 {
402
+ key id: String(4);
403
+ oid: String(128);
404
404
@ODM.oidReference.entityName: 'ReferencedEntityName'
405
405
ref: Association to one E2;
406
406
}
@@ -505,9 +505,9 @@ service CatalogService {
505
505
url: 'https://help.sap.com/docs/product/123.html'
506
506
}
507
507
service A {
508
- entity E1 {
509
- key id: String(4);
510
- oid: String(128);
508
+ entity E1 {
509
+ key id: String(4);
510
+ oid: String(128);
511
511
}
512
512
}` ) ;
513
513
const openAPI = toOpenApi ( csn ) ;
@@ -534,17 +534,17 @@ service CatalogService {
534
534
@OpenAPI.Extensions: {
535
535
![dpp-is-potentially-sensitive]: 'true'
536
536
}
537
- entity E1 {
538
- key id: String(4);
539
- oid: String(128);
537
+ entity E1 {
538
+ key id: String(4);
539
+ oid: String(128);
540
540
}
541
-
541
+
542
542
@OpenAPI.Extensions: {
543
543
![x-sap-operation-intent]: 'read-collection for function',
544
544
![sap-deprecated-operation] : {
545
545
deprecationDate: '2022-12-31',
546
546
successorOperationId: 'successorOperation',
547
- notValidKey: 'notValidValue'
547
+ notValidKey: 'notValidValue'
548
548
}
549
549
}
550
550
function F1(param: String) returns String;
@@ -553,7 +553,7 @@ service CatalogService {
553
553
![x-sap-operation-intent]: 'read-collection for action'
554
554
}
555
555
action A1(param: String) returns String;
556
-
556
+
557
557
}` ) ;
558
558
const openAPI = toOpenApi ( csn ) ;
559
559
expect ( openAPI ) . toBeDefined ( ) ;
0 commit comments