> +@Consumes(MediaType.APPLICATION_JSON)
> +@RequestFilters({ ServiceKeyAuthentication.class })
> +@Path("/api/servicekeys")
> +public interface ServiceKeysApi {
> +
> + @Named("servicekeys:list")
> + @GET
> + List<ServiceKey> listServiceKeys();
> +
> + @Named("servicekeys:create")
> + @POST
> + ServiceKey createServiceKey(@BinderParam(BindToJsonPayload.class)
> CreateServiceKey createServiceKey);
> +
> + @Named("servicekeys:delete")
> + @DELETE
> + void deleteServiceKey(@BinderParam(BindToJsonPayload.class)
> DeleteServiceKey deleteServiceKey);
Looking at this with more detail, it makes not sense to have an object just to
hold a single value. Change these methods to receive a String, and configure
the annotations to automatically populate it to the payload (look at [any
Profitbricks
API](https://github.com/jclouds/jclouds-labs/blob/master/profitbricks/src/main/java/org/jclouds/profitbricks/features/DataCenterApi.java#L64-L69)
for an example) and remove the Create and Delete service key classes.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/149/files#r26168042