You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ch...@apache.org on 2022/10/11 10:58:34 UTC
[flink] branch master updated: [FLINK-29504][rest] Add schema to jar upload content
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 e188cb2d66c [FLINK-29504][rest] Add schema to jar upload content
e188cb2d66c is described below
commit e188cb2d66cc68e5eb822c5cca4fe0ee85173157
Author: Chesnay Schepler <ch...@apache.org>
AuthorDate: Wed Oct 5 10:57:46 2022 +0200
[FLINK-29504][rest] Add schema to jar upload content
---
docs/static/generated/rest_v1_dispatcher.yml | 5 ++++-
.../main/java/org/apache/flink/docs/rest/OpenApiSpecGenerator.java | 6 +++++-
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/docs/static/generated/rest_v1_dispatcher.yml b/docs/static/generated/rest_v1_dispatcher.yml
index 812e618a1b6..bdcbb9b7074 100644
--- a/docs/static/generated/rest_v1_dispatcher.yml
+++ b/docs/static/generated/rest_v1_dispatcher.yml
@@ -97,7 +97,10 @@ paths:
operationId: uploadJar
requestBody:
content:
- application/x-java-archive: {}
+ application/x-java-archive:
+ schema:
+ type: string
+ format: binary
required: true
responses:
"200":
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 738f6226608..38560db5f2a 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
@@ -402,7 +402,11 @@ public class OpenApiSpecGenerator {
new Content()
.addMediaType(
"application/x-java-archive",
- new MediaType())));
+ new MediaType()
+ .schema(
+ new Schema<>()
+ .type("string")
+ .format("binary")))));
}
// TODO: unhack