Skip to content

@Path on resource method different from Jersey #576

@SylvainJuge

Description

@SylvainJuge

With Jersey, the / prefix is not required on method resource paths.

@GET
@Path("{id}")
@ApiOperation(value = "Get Account", notes = "Get Account by ID")
public Account get(@PathParam("id") Long id) {
    return srvc.get(EntityId.fromLong(id));
}

Works as "/accounts/{id}" on Jersey, but as "/accounts{id}" on Swagger.

@GET
@Path("/{id}")
@ApiOperation(value = "Get Account", notes = "Get Account by ID")
public Account get(@PathParam("id") Long id) {
    return srvc.get(EntityId.fromLong(id));
}

It is a minor issue, but following the same behavior as Jersey makes it more intuitive (and avoid few slashes in resources).

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