@Override
        public HttpFile get(
                Executor fileReadExecutor, String path, Clock clock,
                @Nullable String contentEncoding, HttpHeaders additionalHeaders,
                MediaTypeResolver mediaTypeResolver) {
            if (specificationLoader.contains(path)) {
                return HttpFile.from(specificationLoader.get(path).thenApply(file -> {
                    assert file != AggregatedHttpFile.nonExistent();
                    final HttpData fileContent = file.content();
                    final ResponseHeaders fileHeaders = file.headers();
                    final HttpFileAttributes fileAttrs = file.attributes();
                    assert fileContent != null;
                    assert fileHeaders != null;
                    assert fileAttrs != null;

                    final HttpFileBuilder builder = HttpFile.builder(fileContent,
                                                                     fileAttrs.lastModifiedMillis());
                    builder.autoDetectedContentType(false);
                    builder.clock(clock);
                    builder.setHeaders(fileHeaders);
                    builder.setHeaders(additionalHeaders);
                    if (contentEncoding != null) {
                        builder.setHeader(HttpHeaderNames.CONTENT_ENCODING, contentEncoding);
                    }
                    return builder.build();
                }));
            }

            final HttpHeadersBuilder headers = additionalHeaders.toBuilder();
            headers.set(HttpHeaderNames.CACHE_CONTROL, ServerCacheControl.REVALIDATED.asHeaderValue());

            return staticFiles.get(fileReadExecutor, path, clock, contentEncoding,
                                   headers.build(), MediaTypeResolver.ofDefault());
        }
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