Merge "add service for searching in meta data pageable"
[ccsdk/cds.git] / cds-ui / server / src / controllers / blueprint-rest.controller.ts
index b529528..1a8de6b 100644 (file)
@@ -69,6 +69,37 @@ export class BlueprintRestController {
     return await this.bpservice.getAllblueprints();
   }
 
+  @get('/controllerblueprint/paged', {
+    responses: {
+      '200': {
+        description: 'Blueprint model instance with pagination',
+        content: { 'application/json': { schema: { 'x-ts-type': Blueprint } } },
+      },
+    },
+  })
+  async getPagedBlueprints(
+    @param.query.number('limit') limit: number, 
+    @param.query.number('offset') offset: number, 
+    @param.query.string('sort') sort: string) {
+    return await this.bpservice.getPagedBueprints(limit, offset, sort);
+  }
+
+    @get('/controllerblueprint/metadata/paged/{keyword}', {
+        responses: {
+            '200': {
+                description: 'Blueprint model instance with pagination',
+                content: { 'application/json': { schema: { 'x-ts-type': Blueprint } } },
+            },
+        },
+    })
+    async getMetaDataPagedBlueprints(
+        @param.path.string('keyword') keyword: string,
+        @param.query.number('limit') limit: number,
+        @param.query.number('offset') offset: number,
+        @param.query.string('sort') sort: string) {
+        return await this.bpservice.getMetaDataPagedBlueprints(limit, offset, sort,keyword);
+    }
+
  @get('/controllerblueprint/meta-data/{keyword}', {
     responses: {
       '200': {