@Override
    public ServiceSpecification generateSpecification(Set<ServiceConfig> serviceConfigs,
                                                      DocServiceFilter filter,
                                                      DescriptiveTypeInfoProvider descriptiveTypeInfoProvider) {
        requireNonNull(serviceConfigs, "serviceConfigs");
        requireNonNull(filter, "filter");
        requireNonNull(descriptiveTypeInfoProvider, "descriptiveTypeInfoProvider");

        final Map<Class<?>, EntryBuilder> map = new LinkedHashMap<>();

        for (ServiceConfig c : serviceConfigs) {
            final THttpService service = c.service().as(THttpService.class);
            assert service != null;

            service.entries().forEach((serviceName, entry) -> {
                for (Class<?> iface : entry.interfaces()) {
                    final Class<?> serviceClass = iface.getEnclosingClass();
                    final EntryBuilder builder =
                            map.computeIfAbsent(serviceClass, cls -> new EntryBuilder(serviceClass, entry));
                    // Add all available endpoints. Accept only the services with exact and prefix path
                    // mappings, whose endpoint path can be determined.
                    final Route route = c.route();
                    final RoutePathType pathType = route.pathType();
                    if (pathType == RoutePathType.EXACT || pathType == RoutePathType.PREFIX) {
                        builder.endpoint(
                                EndpointInfo.builder(c.virtualHost().hostnamePattern(), route.paths().get(0))
                                            .fragment(serviceName)
                                            .defaultFormat(service.defaultSerializationFormat())
                                            .availableFormats(service.supportedSerializationFormats())
                                            .build());
                    }
                }
            });
        }

        final List<Entry> entries = map.values().stream()
                                       .map(EntryBuilder::build)
                                       .collect(Collectors.toList());
        return generate(entries, filter, descriptiveTypeInfoProvider);
    }
{@link DocServicePlugin} implementation that supports {@link THttpService}s.
thrift/thrift0.13/src/main/java/com/linecorp/armeria/internal/server/thrift/ThriftDocServicePlugin.java