@Override public Collection<ResourceDescription> describe() { if (matcher instanceof StdRestxRequestMatcher) { ResourceDescription description = new ResourceDescription(); StdRestxRequestMatcher stdRouteMatcher = (StdRestxRequestMatcher) matcher; description.path = stdRouteMatcher.getPathPattern(); description.stdPath = stdRouteMatcher.getStdPathPattern(); OperationDescription operation = new OperationDescription(); operation.httpMethod = stdRouteMatcher.getMethod(); operation.nickname = name.substring(name.lastIndexOf('#') + 1); operation.successStatus = getSuccessStatus().createDescriptor(); describeOperation(operation); description.operations = Collections.singletonList(operation); return Collections.singleton(description); } else { return Collections.emptySet(); } }
@Override public Collection<ResourceDescription> describe() { if (matcher instanceof StdRestxRequestMatcher) { ResourceDescription description = new ResourceDescription(); StdRestxRequestMatcher stdRouteMatcher = (StdRestxRequestMatcher) matcher; description.path = stdRouteMatcher.getPathPattern(); description.stdPath = stdRouteMatcher.getStdPathPattern(); OperationDescription operation = new OperationDescription(); operation.httpMethod = stdRouteMatcher.getMethod(); operation.nickname = name.substring(name.lastIndexOf('#') + 1); operation.successStatus = getSuccessStatus().createDescriptor(); describeOperation(operation); description.operations = Collections.singletonList(operation); return Collections.singleton(description); } else { return Collections.emptySet(); } }