confluentinc / vscode

Confluent for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=confluentinc.vscode-confluent
Apache License 2.0
13 stars 3 forks source link

Add schematized produce by looking up latest schema version #584

Open rohitsanj opened 4 days ago

rohitsanj commented 4 days ago

Fetch latest schema for the key/value and pass in the schema_version in the Produce Records payload.

Example (This payload body is what Sidecar expects and is not an exact copy of the message file contents)

curl http://localhost:26636/kafka/v3/clusters/my-cluster/topics/my-topic/records \
-H "Authorization: Bearer $access_token" \
-H "X-connection-id": "my-connection-id" \
-d '{
  "headers": {
    "foo": "bar"
  }
  "key": {
    "schema_version": 2,
    "data": 123
  },
  "value": {
    "schema_version": 3,
    "data":  {
      "ordertime": 1505510136717,
      "orderid": 1238,
      "itemid": "Item_92",
      "orderunits": 6.302653935989815,
      "address": {
        "city": "City_",
        "state": "State_47",
        "zipcode": 91197
      }
    }
  }
}'