@Path(":description") @Produces(MediaType.APPLICATION_JSON) @GET public Map<String, Object> getJSONDescription() { return describe(); }
public Map<String, Object> describe() { Map<String, Object> description = new HashMap<>(); description.put("superclass", getClass().getSuperclass().getName()); description.put("class", getClass().getName()); description.put("path", getPath()); description.put("children", getSubResources()); describe(description); return description; }