[ 
https://issues.apache.org/jira/browse/FLINK-8133?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16281654#comment-16281654
 ] 

ASF GitHub Bot commented on FLINK-8133:
---------------------------------------

Github user kl0u commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5052#discussion_r155483634
  
    --- Diff: 
flink-docs/src/main/java/org/apache/flink/docs/rest/RestAPIDocGenerator.java ---
    @@ -0,0 +1,315 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *     http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +package org.apache.flink.docs.rest;
    +
    +import org.apache.flink.api.java.tuple.Tuple2;
    +import org.apache.flink.configuration.Configuration;
    +import org.apache.flink.runtime.concurrent.Executors;
    +import org.apache.flink.runtime.dispatcher.DispatcherGateway;
    +import org.apache.flink.runtime.dispatcher.DispatcherRestEndpoint;
    +import org.apache.flink.runtime.resourcemanager.ResourceManagerGateway;
    +import org.apache.flink.runtime.rest.RestServerEndpoint;
    +import org.apache.flink.runtime.rest.RestServerEndpointConfiguration;
    +import org.apache.flink.runtime.rest.handler.RestHandlerConfiguration;
    +import org.apache.flink.runtime.rest.handler.RestHandlerSpecification;
    +import org.apache.flink.runtime.rest.messages.EmptyRequestBody;
    +import org.apache.flink.runtime.rest.messages.EmptyResponseBody;
    +import org.apache.flink.runtime.rest.messages.MessageHeaders;
    +import org.apache.flink.runtime.rest.messages.MessagePathParameter;
    +import org.apache.flink.runtime.rest.messages.MessageQueryParameter;
    +import org.apache.flink.runtime.webmonitor.retriever.GatewayRetriever;
    +import 
org.apache.flink.runtime.webmonitor.retriever.MetricQueryServiceRetriever;
    +import org.apache.flink.util.ConfigurationException;
    +
    +import 
org.apache.flink.shaded.netty4.io.netty.channel.ChannelInboundHandler;
    +
    +import com.fasterxml.jackson.core.JsonProcessingException;
    +import com.fasterxml.jackson.databind.ObjectMapper;
    +import com.fasterxml.jackson.module.jsonSchema.JsonSchema;
    +import com.fasterxml.jackson.module.jsonSchema.JsonSchemaGenerator;
    +import org.slf4j.Logger;
    +import org.slf4j.LoggerFactory;
    +
    +import java.io.IOException;
    +import java.nio.charset.StandardCharsets;
    +import java.nio.file.Files;
    +import java.nio.file.Path;
    +import java.nio.file.Paths;
    +import java.util.Collection;
    +import java.util.Comparator;
    +import java.util.List;
    +import java.util.concurrent.CompletableFuture;
    +import java.util.concurrent.Executor;
    +import java.util.stream.Collectors;
    +
    +/**
    + * Generator for the Rest API documentation.
    + *
    + * <p>This class can be either invoked directly
    + *
    + * <p>One HTML file is generated for each {@link RestServerEndpoint} 
implementation
    + * that can be embedded into .md files using {@code {% include 
${generated.docs.dir}/file.html %}}.
    + * Each file contains a series of HTML tables, one for each REST call.
    + *
    + * <p>The generated table for each REST call looks like this:
    + * ----------------------------------------------------------
    + * | URL                                                    |
    + * ----------------------------------------------------------
    + * | Verb: verb | Response code: responseCode               |
    --- End diff --
    
    What about in the 'Verb' section adding sth like `GET | POST | UPDATE` etc? 
It becomes a bit long but it may be worth explaining what we mean by `Verb`.


> Generate documentation for new REST API
> ---------------------------------------
>
>                 Key: FLINK-8133
>                 URL: https://issues.apache.org/jira/browse/FLINK-8133
>             Project: Flink
>          Issue Type: Improvement
>          Components: Documentation, REST
>            Reporter: Chesnay Schepler
>            Assignee: Chesnay Schepler
>            Priority: Blocker
>             Fix For: 1.5.0
>
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to