This is an automated email from the ASF dual-hosted git repository. chesnay pushed a commit to branch release-1.17 in repository https://gitbox.apache.org/repos/asf/flink.git
The following commit(s) were added to refs/heads/release-1.17 by this push: new 8d7b42c9480 [FLINK-31711][docs] Include complete-statement request body 8d7b42c9480 is described below commit 8d7b42c9480dd61bc0bbe935ca5b746697bc0ad8 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 887930eb65a..0ef73c63c7b 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 38560db5f2a..e5887b137d1 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 @@ -374,9 +374,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(