dmvk commented on code in PR #22139:
URL: https://github.com/apache/flink/pull/22139#discussion_r1131225720


##########
flink-docs/src/test/java/org/apache/flink/docs/rest/OpenApiSpecGeneratorTest.java:
##########
@@ -131,4 +129,28 @@ public List<Tuple2<RestHandlerSpecification, 
ChannelInboundHandler>> initializeH
                     Tuple2.of(new TestEmptyMessageHeaders("operation1"), 
null));
         }
     }
+
+    @Test
+    void testAdditionalFields(@TempDir Path tmpDir) throws Exception {
+        final Path file = tmpDir.resolve("openapi_spec.yaml");
+        OpenApiSpecGenerator.createDocumentationFile(
+                "title", new TestAdditionalFieldsRestEndpoint(), 
RuntimeRestAPIVersion.V0, file);
+        final String actual = new String(Files.readAllBytes(file), 
StandardCharsets.UTF_8);
+        assertThat(actual)
+                .contains(
+                        "    AdditionalFieldsRequestBody:\n"
+                                + "      type: object\n"
+                                + "      additionalProperties:\n"
+                                + "        type: string");

Review Comment:
   I've adjusted the test to work directly on the java representation



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to