Skip to content

Commit

Permalink
Maint/renaming kafka source plugin setting (opensearch-project#4429)
Browse files Browse the repository at this point in the history
* MAINT: schema registry setting renaming

Signed-off-by: George Chen <[email protected]>
  • Loading branch information
chenqi0805 authored Apr 19, 2024
1 parent 64445fa commit ef39d4f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

package org.opensearch.dataprepper.plugins.kafka.configuration;

import com.fasterxml.jackson.annotation.JsonAlias;
import com.fasterxml.jackson.annotation.JsonProperty;
import jakarta.validation.Valid;
import jakarta.validation.constraints.AssertTrue;
Expand All @@ -31,10 +32,12 @@ public class SchemaConfig {
@JsonProperty("version")
private int version;

@JsonProperty("schema_registry_api_key")
@JsonAlias("schema_registry_api_key")
@JsonProperty("api_key")
private String schemaRegistryApiKey;

@JsonProperty("schema_registry_api_secret")
@JsonAlias("schema_registry_api_secret")
@JsonProperty("api_secret")
private String schemaRegistryApiSecret;

@JsonProperty("session_timeout_ms")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ void test_schemaConfig_not_null() {
assertThat(schemaConfig, notNullValue());
assertThat(schemaConfig.getVersion(), notNullValue());
assertThat(schemaConfig.getRegistryURL(), notNullValue());
assertThat(schemaConfig.getSchemaRegistryApiKey(), notNullValue());
assertThat(schemaConfig.getSchemaRegistryApiSecret(), notNullValue());
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ log-pipeline:
schema:
registry_url: http://localhost:8081/
version: 1
schema_registry_api_key: 7QV2UXHRVNOC6AJD
schema_registry_api_secret: 6M9xLZDIfmyBN9cqNm2n9GU23mleiaIHJWqQeA5P4JY/LyShaRqPuLJw0XhQQ1pD
api_key: 7QV2UXHRVNOC6AJD
api_secret: 6M9xLZDIfmyBN9cqNm2n9GU23mleiaIHJWqQeA5P4JY/LyShaRqPuLJw0XhQQ1pD
basic_auth_credentials_source: USER_INFO
session_timeout_ms: 45000
aws:
Expand Down

0 comments on commit ef39d4f

Please sign in to comment.