dmvk commented on code in PR #22139:
URL: https://github.com/apache/flink/pull/22139#discussion_r1131227316
##########
flink-docs/src/test/java/org/apache/flink/docs/rest/RestAPIDocGeneratorTest.java:
##########
@@ -60,6 +62,22 @@ void testExcludeFromDocumentation() throws Exception {
"This REST API should also not appear in the generated
documentation.");
}
+ @Test
+ void testAdditionalFields() {
+ final String messageHtmlEntry =
+ RestAPIDocGenerator.createMessageHtmlEntry(
+ TestAdditionalFields.class, null,
EmptyRequestBody.class);
+ assertThat(messageHtmlEntry)
+ .isEqualTo(
+ "{\n"
+ + " \"type\" : \"object\",\n"
+ + " \"id\" :
\"urn:jsonschema:org:apache:flink:docs:rest:RestAPIDocGeneratorTest:TestAdditionalFields\",\n"
+ + " \"additionalProperties\" : {\n"
+ + " \"type\" : \"string\"\n"
+ + " }\n"
+ + "}");
Review Comment:
I think it's OK here because we're asserting the whole generated document
and not just a part. If the generated structure changes it's fine to revisit
this.
--
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]