@Override
    public HttpResponse serve(ServiceRequestContext ctx, HttpRequest req) throws Exception {
        if ("/injected.js".equals(ctx.mappedPath())) {
            return HttpResponse.of(MediaType.JAVASCRIPT_UTF_8,
                                   injectedScriptSuppliers.stream()
                                                          .map(f -> f.apply(ctx, req))
                                                          .collect(Collectors.joining("\n")));
        }

        return unwrap().serve(ctx, req);
    }
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