Annotation Type ApiRoot
Defines the Root of a particular category. If this is not defined the default model for the category will be used.
-
Required Element Summary
Required ElementsModifier and TypeRequired ElementDescriptionThe Sling path to use when creating this resource. -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionClass<? extends ModelPathMapper> If paths in the content tree need to changed as they go into the API space implement a ModelPathMapper the converts between the new URL spaces.
-
Element Details
-
baseResource
String baseResourceThe Sling path to use when creating this resource. This will allow the API framework to inject the correct resource when rendering the Root API response, e.g. /api/category.json- Returns:
- the base resource path
-
pathMapper
Class<? extends ModelPathMapper> pathMapperIf paths in the content tree need to changed as they go into the API space implement a ModelPathMapper the converts between the new URL spaces. This allows a developer to have total control over all the paths generated by the API endpoint. Be careful when doing this as it would be easy to create incorrect URLs.- Returns:
- class that will manage the URL mappings
- Default:
com.adobe.granite.haf.apiroot.impl.EchoMapper.class
-