@VisibleForTesting
    static String createMessageHtmlEntry(
            Class<?> messageClass,
            @Nullable Class<?> nestedAsyncOperationResultClass,
            Class<?> emptyMessageClass) {
        JsonSchema schema = generateSchema(messageClass);

        if (nestedAsyncOperationResultClass != null) {
            JsonSchema innerSchema = generateSchema(nestedAsyncOperationResultClass);
            schema.asObjectSchema()
                    .getProperties()
                    .put(AsynchronousOperationResult.FIELD_NAME_OPERATION, innerSchema);
        }

        ApiSpecGeneratorUtils.findAdditionalFieldType(messageClass)
                .map(RestAPIDocGenerator::generateSchema)
                .ifPresent(
                        additionalFieldSchema ->
                                schema.asObjectSchema()
                                        .setAdditionalProperties(
                                                new ObjectSchema.SchemaAdditionalProperties(
                                                        additionalFieldSchema)));

        String json;
        if (messageClass == emptyMessageClass) {
            json = "{}";
        } else {
            try {
                json = mapper.writerWithDefaultPrettyPrinter().writeValueAsString(schema);
            } catch (JsonProcessingException e) {
                LOG.error(
                        "Failed to write message schema for class {}.",
                        messageClass.getCanonicalName(),
                        e);
                throw new RuntimeException(
                        "Failed to write message schema for class "
                                + messageClass.getCanonicalName()
                                + ".",
                        e);
            }
        }

        return json;
    }
@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"
                                + "}");
    }