diff options
Diffstat (limited to 'cds-ui/server/src/controllers')
-rw-r--r-- | cds-ui/server/src/controllers/blueprint-rest.controller.ts | 13 | ||||
-rw-r--r-- | cds-ui/server/src/controllers/data-dictionary.controller.ts | 16 |
2 files changed, 29 insertions, 0 deletions
diff --git a/cds-ui/server/src/controllers/blueprint-rest.controller.ts b/cds-ui/server/src/controllers/blueprint-rest.controller.ts index 1a8de6b47..b2a11281f 100644 --- a/cds-ui/server/src/controllers/blueprint-rest.controller.ts +++ b/cds-ui/server/src/controllers/blueprint-rest.controller.ts @@ -50,6 +50,7 @@ import * as multiparty from 'multiparty'; import * as request_lib from 'request'; import { processorApiConfig, appConfig } from '../config/app-config'; import { bluePrintManagementServiceGrpcClient } from '../clients/blueprint-management-service-grpc-client'; +import {BlueprintDetail} from '../models/blueprint.detail.model'; export class BlueprintRestController { constructor( @@ -68,6 +69,18 @@ export class BlueprintRestController { async getall() { return await this.bpservice.getAllblueprints(); } + @get('/controllerblueprint/{id}', { + responses: { + '200': { + description: 'Blueprint model instance', + content: { 'application/json': { schema: { 'x-ts-type': BlueprintDetail } } }, + }, + }, + }) + async getOneBluePrint(@param.path.string('id') id: string) { + return await this.bpservice.getOneBluePrint(id); + } + @get('/controllerblueprint/paged', { responses: { 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); + } + } |