diff --git a/packages/bookshop/mta.yaml b/packages/bookshop/mta.yaml new file mode 100644 index 00000000..60877e25 --- /dev/null +++ b/packages/bookshop/mta.yaml @@ -0,0 +1,44 @@ +####### Generated mta.yaml based on template version 0.2.0 +####### appName = capire-bookshop +####### language=nodejs; multiTenant=false +####### approuter= + +_schema-version: '3.1' +ID: sap.capire-bookshop +version: 1.0.0 +description: "A simple bookshop application, build in a self-contained all-in-one fashion, i.e. w/o reusing other packages." + +build-parameters: + before-all: + - builder: custom + commands: + - npm install + - cds build/all + +parameters: + enable-parallel-deployments: true + +modules: + ############## SERVER MODULE ########################## + - name: capire-bookshop-srv + type: nodejs + path: gen/srv + properties: + EXIT: 1 # required by deploy.js task to terminate + + + + ############################################################ + + ############## SIDECAR MODULE ######################### + - name: db + + type: hdb + path: gen/db + parameters: + app-name: capire-bookshop-db + requires: + #### Hana and xsuaa resources extracted from CAP configuration #### + ############################################################ + + diff --git a/packages/bookshop/srv/cat-service.cds b/packages/bookshop/srv/cat-service.cds index 883308f2..ebc55a15 100644 --- a/packages/bookshop/srv/cat-service.cds +++ b/packages/bookshop/srv/cat-service.cds @@ -7,7 +7,7 @@ service CatalogService { author.name as author } excluding { createdBy, modifiedBy }; - @requires_: 'authenticated-user' + @requires: 'authenticated-user' @insertonly entity Orders as projection on my.Orders; } \ No newline at end of file diff --git a/packages/bookshop/tests/authors.http b/packages/bookshop/tests/authors.http deleted file mode 100644 index 4fecd5b6..00000000 --- a/packages/bookshop/tests/authors.http +++ /dev/null @@ -1,25 +0,0 @@ -### Service Document -GET http://localhost:4004/admin/Authors - -### Create Author -POST http://localhost:4004/admin/Authors HTTP/1.1 -content-Type: application/json - -{ - "ID": 105, - "name": "J.K. Rowling", - "dateOfBirth": null, - "dateOfDeath": null, - "placeOfBirth": "", - "placeOfDeath": "" -} -### Update Author -PATCH http://localhost:4004/admin/Authors/105 HTTP/1.1 -content-Type: application/json - -{ - "placeOfBirth": "United Kingdom" -} - -### Delete Author -DELETE http://localhost:4004/admin/Authors/105 HTTP/1.1