The only way I can think of is a Filter. But by definition a filter should alter some headers or inject some information and in my case I need to generate the whole response.
The question was not clear. You can Develop using resource type & in filter.resource.type mention all the applicable resources type for page1 to pageN if there are variations.
The question was not clear. You can Develop using resource type & in filter.resource.type mention all the applicable resources type for page1 to pageN if there are variations.