@Get("/blogs")
    @ProducesJson
    public Iterable<BlogPost> getBlogPosts(@Param @Default("true") boolean descending) {
        if (descending) {
            return blogPosts.entrySet()
                            .stream()
                            .sorted(Collections.reverseOrder(Comparator.comparingInt(Entry::getKey)))
                            .map(Entry::getValue).collect(Collectors.toList());
        }
        return blogPosts.values().stream().collect(Collectors.toList());
    }
Retrieves all {@link BlogPost}s created so far in the reverse chronological order .
examples/tutorials/rest-api-annotated-service/src/main/java/example/armeria/server/blog/BlogService.java