This is an automated email from the ASF dual-hosted git repository. chesnay pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/flink.git
The following commit(s) were added to refs/heads/master by this push: new 46aeebd150f [FLINK-31711][docs] Include complete-statement request body 46aeebd150f is described below commit 46aeebd150fe56995d85365cf5d44dd54854224e Author: Chesnay Schepler <ches...@apache.org> AuthorDate: Mon Apr 3 15:25:58 2023 +0200 [FLINK-31711][docs] Include complete-statement request body --- docs/static/generated/rest_v2_sql_gateway.yml | 13 +++++++++++++ .../org/apache/flink/docs/rest/OpenApiSpecGenerator.java | 4 +--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/docs/static/generated/rest_v2_sql_gateway.yml b/docs/static/generated/rest_v2_sql_gateway.yml index 1284d0ae67f..42ca8d5bd59 100644 --- a/docs/static/generated/rest_v2_sql_gateway.yml +++ b/docs/static/generated/rest_v2_sql_gateway.yml @@ -95,6 +95,11 @@ paths: required: true schema: $ref: '#/components/schemas/SessionHandle' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CompleteStatementRequestBody' responses: "200": description: The request was successful. @@ -300,6 +305,14 @@ components: $ref: '#/components/schemas/LogicalType' name: type: string + CompleteStatementRequestBody: + type: object + properties: + position: + type: integer + format: int32 + statement: + type: string CompleteStatementResponseBody: type: object properties: diff --git a/flink-docs/src/main/java/org/apache/flink/docs/rest/OpenApiSpecGenerator.java b/flink-docs/src/main/java/org/apache/flink/docs/rest/OpenApiSpecGenerator.java index 915743651f9..ad5f62e2969 100644 --- a/flink-docs/src/main/java/org/apache/flink/docs/rest/OpenApiSpecGenerator.java +++ b/flink-docs/src/main/java/org/apache/flink/docs/rest/OpenApiSpecGenerator.java @@ -377,9 +377,7 @@ public class OpenApiSpecGenerator { private static void setRequest(final Operation operation, final MessageHeaders<?, ?, ?> spec) { // empty request bodies should not be documented at all - // additionally, hide legacy APIs that accepted parameters via request body - if (spec.getRequestClass() != EmptyRequestBody.class - && spec.getHttpMethod() != HttpMethodWrapper.GET) { + if (spec.getRequestClass() != EmptyRequestBody.class) { operation.requestBody( new RequestBody() .content(