private CompletableFuture<AggregatedHttpFile> loadVersions(Executor executor) {
            return files.computeIfAbsent(VERSIONS_PATH, key -> CompletableFuture.supplyAsync(() -> {
                final List<Version> versions = ImmutableList.copyOf(
                        Version.getAll(DocService.class.getClassLoader()).values());
                try {
                    final byte[] content = jsonMapper.writerWithDefaultPrettyPrinter()
                                                     .writeValueAsBytes(versions);
                    return toFile(content, MediaType.JSON_UTF_8);
                } catch (JsonProcessingException e) {
                    throw new RuntimeException(e);
                }
            }, executor));
        }
Creates a new instance with example HTTP headers and example requests and injected scripts.
core/src/main/java/com/linecorp/armeria/server/docs/DocService.java