title: Kafka Connect, get Json Schema for JsonConverter
body: <p>I'm trying to set up <strong>kafka-connector</strong> with a <strong>custom value converter</strong>.</p>
  
  <p>I'm using kafka to transfer serialised thrift objects.<br>
  I want to set up a kafka-connector which is deserialising thrift-messages, converting them to json and sending to elasticsearch. </p>
  
  <p>Method <code>org.apache.kafka.connect.storage.Converter#toConnectData</code> returns <code>SchemaAndValue</code>, which needs <code>org.apache.kafka.connect.data.Schema</code>.<br>
  <strong>How do I get this schema for my json?</strong></p>
  
  <p>What I tried so far:</p>
  
  <p>I tried to extend <code>org.apache.kafka.connect.json.JsonConverter</code>, but It has it's own schema coming from somewhere.</p>
  
  <p>I tried to generate schema using this library: <a href="https://github.com/reinert/JJSchema" rel="nofollow noreferrer">https://github.com/reinert/JJSchema</a>, but <code>JsonConverter</code> seems to have it's own format: it expects <code>map</code> instead of <code>object</code>, etc.<br>
  See: <a href="https://github.com/apache/kafka/blob/trunk/connect/json/src/main/java/org/apache/kafka/connect/json/JsonConverter.java#L408" rel="nofollow noreferrer">https://github.com/apache/kafka/blob/trunk/connect/json/src/main/java/org/apache/kafka/connect/json/JsonConverter.java#L408</a></p>
  
  <p>Despite that I have disable schema (<code>"value.converter.schemas.enable":"false"</code>) in my config, the connector is still crashing and complaining about schema. <strong>Where is this schema coming from? How do they generate it?</strong></p>
  
  <p>I'm going to write a method which is recursively renaming all "wrong" things in json schema, but that's too awkward. <strong>Is there a proper approach?</strong></p>
  
  <p>UPD: My config is</p>
  
  <pre><code>{
      "connector.class": "io.confluent.connect.elasticsearch.ElasticsearchSinkConnector",
      "tasks.max": "1",
      "topics": "mytopic",
      "key.ignore": "true",
      "connection.url": "https://my-elastic:443",
      "type.name": "event",
      "elasticsearch.index.prefix" : "kafka",
      "key.converter": "org.apache.kafka.connect.storage.StringConverter",
      "value.converter" : "com.example.ThriftToJsonDeserializer",
      "value.converter.schemas.enable":"false"
  }
  </code></pre>