Sling Exporter with custom selector
Hi,
I'm trying to use sling exporter framework (Adobe Experience Manager Help | Developing Sling Model Exporters in AEM , Apache Sling :: Sling Models to export sling model data. This is for Content As A Service.
My requirement is that, in CaaS REST api url, I should be able to pass query parameter so that we can return/export data accordingly based on the parameter value.
For that i added custom sling selector option in Sling Model exporter to expose JSON accordingly.
Here is a snapshot of the class. If you look at it, i'm setting the "selector" attribute with "mobile"
The url i'm hitting:
http://localhost:6502/content/wcms/api/v1/as/devicedata.mobile.json
This give me error "
Invalid recursion selector value 'mobile'
It seems that the request is getting resolved by DefaultGetServlet instead of the dynamically generated Sling Models Exporter Servlets.
I can see the exporter servlets class here :http://localhost:6502/system/console/status-slingmodels
Any guidance is greatly appreciated.
Thanks
Ved