@Nullable
    @Override
    public HttpEndpointSpecification httpEndpointSpecification(Route route) {
        requireNonNull(route, "route");
        final TranscodingSpec spec = routeAndSpecs.get(route);
        if (spec == null) {
            return null;
        }
        final Set<String> paramNames = spec.pathVariables.stream().map(PathVariable::name)
                                                         .collect(toImmutableSet());
        final Map<String, Parameter> parameterTypes =
                spec.originalFields.entrySet().stream().collect(
                        toImmutableMap(Entry::getKey,
                                       fieldEntry -> new Parameter(fieldEntry.getValue().type(),
                                                                   fieldEntry.getValue().isRepeated(),
                                                                   fieldEntry.getValue().isRequired())));
        return new HttpEndpointSpecification(spec.order,
                                             route,
                                             paramNames,
                                             spec.serviceDescriptor,
                                             spec.methodDescriptor,
                                             parameterTypes,
                                             spec.httpRule);
    }
Creates a new {@link GrpcService} instance from the given {@code delegate}. If it is possible
to support HTTP/JSON to gRPC transcoding, a new {@link HttpJsonTranscodingService} instance
would be returned. Otherwise, the {@code delegate} would be returned.
grpc/src/main/java/com/linecorp/armeria/server/grpc/HttpJsonTranscodingService.java