title: How to use an interface for REST API definition in Quarkus?
body: <p>I want to define a REST API using JAX RS against an interface, and then implement this interface in both the server and any number of clients. Quarkus doesn't seem to support this unless you duplicate parts of the API definition in the implementations.</p>
  <p>Eg, it should be possible to do the following:</p>
  <pre><code>@Path(&quot;/hello&quot;)
  interface GreetingApi {
      @GET
      @Produces(MediaType.TEXT_PLAIN)
      @Path(&quot;/greeting/{name}&quot;)
      fun greeting(@PathParam(&quot;name&quot;) name: String): String?
  }
  
  class GreetingEndpoint(private val service: NameService) : GreetingApi {
      override fun greeting(name: String): String? {
          return service.greeting(name)
      }
  }
  
  @RegisterRestClient
  interface GreetingClient : GreetingApi
  </code></pre>
  <p>However, both the client and server require an additional <code>@Path(&quot;/hello&quot;)</code> annotation in order for registration (without them under test it throws 404), which is both redundant and unnecessary duplication.</p>
  <p>Is it possible to define the full API solely on the interface?</p>