Skip to content

Annotations inheritance in MVC routes #1552

@franklx

Description

@franklx

Annotations on methods of base class are not preserved in children.

open class Base {
    @GET fun get() {}
    @POST fun post() {}
    @GET("{id}") fun get_id(@PathParam id: Int) {}
    @GET @Path("/alt/{id}") fun get_path_id(@PathParam id: Int) {}
}

@Path("/child") class Child: Base() {
    @GET("/children") fun children() {}
}

the above code generates:

  GET  /child/children

in jooby v1 generated:

  GET  /child
  POST /child
  GET  /child/{id}
  GET  /child/alt/{id}
  GET  /child/children

I wanted to fix it but I'm not really up on annotations processing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions