This repository contains an example to show how to create a REST-based service out of an OSGi service by using the Whiteboard Specification for Jakarta™ RESTful Web Services and the OSGi Technology Whiteboard Implementation for Jakarta RESTful Web Services reference implementation.
There is a blog post related to this repository that explains the details:
Build REST services with the OSGi Whiteboard Specification for Jakarta™ RESTful Web Services