private CompletableFuture<AggregatedHttpFile> loadSpecifications(
                CompletableFuture<ServiceSpecification> specificationFuture) {
            return files.computeIfAbsent(SPECIFICATION_PATH, key -> specificationFuture.thenApply(spec -> {
                try {
                    final byte[] content = jsonMapper.writerWithDefaultPrettyPrinter()
                                                     .writeValueAsBytes(spec);
                    return toFile(content, MediaType.JSON_UTF_8);
                } catch (JsonProcessingException e) {
                    throw new RuntimeException(e);
                }
            }));
        }
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