cleaned up
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
const cds = require ('@sap/cds')
|
||||
const { expect } = require('chai').use (require('chai-deep-match'))
|
||||
const { expect } = require('chai') .use (require('chai-subset'))
|
||||
|
||||
describe('reading/writing hierarchies', ()=>{
|
||||
|
||||
@@ -35,7 +35,7 @@ describe('reading/writing hierarchies', ()=>{
|
||||
})
|
||||
}) .where ({name:'Cat'})
|
||||
|
||||
) .to.deep.match (
|
||||
) .to.containSubset (
|
||||
|
||||
{ ID:101, parent:'Cat', children:[
|
||||
{ child:'Kitty' },
|
||||
@@ -53,7 +53,7 @@ describe('reading/writing hierarchies', ()=>{
|
||||
c.ID, c.name, c.children (c=>{ c.name },{levels:3})
|
||||
}) .where ({name:'Cat'})
|
||||
|
||||
) .to.deep.match (
|
||||
) .to.containSubset (
|
||||
|
||||
{ ID:101, name:'Cat', children:[
|
||||
{ name:'Kitty', children:[
|
||||
|
||||
@@ -1,18 +1,40 @@
|
||||
### Service Document
|
||||
GET http://localhost:4004/browse
|
||||
###
|
||||
|
||||
### Service $metadata document
|
||||
GET http://localhost:4004/browse/$metadata
|
||||
###
|
||||
|
||||
|
||||
### Browsing Books
|
||||
GET http://localhost:4004/browse/Books?
|
||||
# &$select=title,author
|
||||
# &$expand=currency
|
||||
&$select=title,stock
|
||||
&$expand=currency
|
||||
#> add @capire/common to see data for currencies
|
||||
# &sap-language=de
|
||||
###
|
||||
|
||||
|
||||
### Browsing Authors
|
||||
GET http://localhost:4004/admin/Authors?
|
||||
# &$select=name,dateOfBirth,placeOfBirth
|
||||
# &$expand=books($select=title;$expand=currency)
|
||||
&$expand=books($select=title;$expand=currency)
|
||||
#> add @capire/common to see data for currencies
|
||||
# &$filter=ID eq 101
|
||||
# &sap-language=de
|
||||
&sap-language=de
|
||||
###
|
||||
|
||||
|
||||
POST http://localhost:4004/browse/order
|
||||
# Run that three times to get out-of-stock message
|
||||
Content-Type: application/json
|
||||
|
||||
{ "book":201, "amount":5 }
|
||||
###
|
||||
|
||||
|
||||
|
||||
GET http://localhost:4004/browse/Genres?
|
||||
###
|
||||
|
||||
GET http://localhost:4004/browse/Genres?
|
||||
&$filter=parent_ID eq null&$select=name
|
||||
&$expand=children($select=name)
|
||||
###
|
||||
|
||||
Reference in New Issue
Block a user