From 54865af76aedb77dc6abc560c095864094e6ad64 Mon Sep 17 00:00:00 2001 From: ShaabanEltanany Date: Wed, 4 Dec 2019 17:09:41 +0200 Subject: add service for getting model type with definition Issue-ID: CCSDK-1770 Signed-off-by: ShaabanEltanany Change-Id: I7f3278e97119a144c889d83891fa5de6796c7fb2 --- .../server/src/controllers/data-dictionary.controller.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'cds-ui/server/src/controllers/data-dictionary.controller.ts') diff --git a/cds-ui/server/src/controllers/data-dictionary.controller.ts b/cds-ui/server/src/controllers/data-dictionary.controller.ts index eab0bc50c..076d714c6 100644 --- a/cds-ui/server/src/controllers/data-dictionary.controller.ts +++ b/cds-ui/server/src/controllers/data-dictionary.controller.ts @@ -96,6 +96,9 @@ export class DataDictionaryController { return await this.rdservice.getModelType(source); } + /** + * @deprecated use getResourceDictionaryByType Instead. + */ @get('/resourcedictionary/model-type/by-definition/data_type', { responses: { '200': { @@ -104,6 +107,19 @@ export class DataDictionaryController { }, }) async getDataTypes() { + console.warn("Calling deprecated function!"); return await this.rdservice.getDataTypes(); } + + @get('/resourcedictionary/model-type/by-definition/{type}', { + responses: { + '200': { + content: {'application/json': {}}, + }, + }, + }) + async getResourceDictionaryByType(@param.path.string('type') type: string) { + return await this.rdservice.getResourceDictionaryByType(type); + } + } -- cgit 1.2.3-korg