-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Description
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).