1 // Uncomment these imports to begin using these cool features!
3 // import {inject} from '@loopback/context';
17 } from '@loopback/rest';
18 import { inject } from '@loopback/core';
19 import { ControllerCatalogService } from '../services';
21 export class ControllerCatalogController {
23 @inject('services.ControllerCatalogService')
24 public Ccservice: ControllerCatalogService,
27 @get('/controllercatalog/search/{tags}', {
30 content: { 'application/json': {} },
34 async getByTags(@param.path.string('tags') tags: string) {
35 return await this.Ccservice.getByTags(tags);
38 @post('/controllercatalog/save', {
41 content: { 'application/json': {} }
45 async save(@requestBody({
46 content: { 'application/json': { schema: { 'x-ts-type': JSON } } },
47 accepts: { 'application/json': { schema: { 'x-ts-type': JSON } } }
48 }) controllerCatalog: JSON): Promise<any> {
49 return await this.Ccservice.save(controllerCatalog);
52 @get('/controllercatalog/model-type/by-definition/{definitionType}', {
55 content: { 'application/json': {} },
59 async getDataTypes(@param.path.string('definitionType') definitionType: string) {
60 return await this.Ccservice.getDefinitionTypes(definitionType);
63 @del('/controllercatalog/model-type/{name}', {
66 content: { 'application/json': {} }
70 async delete(@param.path.string('name') name: string): Promise<JSON> {
71 return await this.Ccservice.deleteCatalog(name);