Skip to content

Commit

Permalink
Enabling schema registry compatibility check for protobuf schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
daengi committed Oct 2, 2023
1 parent fe51c34 commit ee1e3a4
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -3,6 +3,7 @@
import at.esque.kafka.alerts.ErrorAlert;
import at.esque.kafka.controls.KafkaEsqueCodeArea;
import io.confluent.kafka.schemaregistry.client.rest.RestService;
import io.confluent.kafka.schemaregistry.client.rest.entities.Schema;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.scene.control.Label;
Expand Down Expand Up @@ -40,7 +41,8 @@ public class SchemaCompatibilityCheckController {
public void addSchema(ActionEvent actionEvent) {

try {
List<String> compatibility = restService.testCompatibility(schemaTextArea.getText(), subjectTextField.getText(), versionTextField.getText());
Schema schema = restService.getVersion(subjectTextField.getText(), Integer.parseInt(versionTextField.getText()));
List<String> compatibility = restService.testCompatibility(schemaTextArea.getText(), schema.getSchemaType(), null, subjectTextField.getText(), versionTextField.getText(), false);

if (compatibility.isEmpty()) {
resultLabel.setTextFill(Color.web("#3d7a3d"));
Expand Down

0 comments on commit ee1e3a4

Please sign in to comment.