Reputation: 458
I have a Mule Flow based on RAML that performs a sql query that returns 180 or so rows. I have the traits paging defined in my yaml. But when I run the flow seems to return all rows. instead of 10 rows at a time below is a fragment of my yaml. Do I need to implement paging on the back end also
/books/{topicName}:
get:
is: [ paged ]
responses:
200:
body:
application/json:
schema: !include books-output.json
example: !include books-example.json
traits:
- paged:
queryParameters:
pagenumber:
description: The page number of the result-set to return.
type: integer
minimum: 0
pagesize:
description: The number of rows in a page request.
type: integer
maximum: 10
Thanks.
Upvotes: 1
Views: 4516
Reputation: 11606
Yes, you will need to implement paging on the back end also. The RAML trait just defines the interface of how to pass the paging info to your API.
Upvotes: 1