SAP-archive / sap-devtoberfest-2020

The home of Devtoberfest 2020 - an open celebration of what makes us developers – coding and collaboration!
Apache License 2.0
180 stars 86 forks source link

SAP CAP Model - Ex. 04 - Send request error - 404 NOT FOUND #88

Closed debjanijena closed 3 years ago

debjanijena commented 3 years ago

In Ex 04, while sending request I/m getting 404 Not found error.

Send request is: GET http://localhost:4004/catalog/BookAuthors

Error response: <!DOCTYPE html>

Error
Cannot GET /catalog/BookAuthors

Schema cds: namespace dj.shopbooks;

entity BooksAvailable { key ID : Integer; title : String; stocks : String; author : Association to BookAuthors; }

entity BookAuthors { key ID : Integer; name : String; books : Association to many BooksAvailable on books.author = $self; }

catalog-services using dj.shopbooks as dj from '../db/schema';

service BookShopService { entity BooksAvailable as projection on dj.BooksAvailable; entity BookAuthors as projection on dj.BookAuthors;
}