Skip to content

Commit

Permalink
cluster: fix topic config for schema id validation
Browse files Browse the repository at this point in the history
This is a follow up to the 5bdda95 commit
  • Loading branch information
rystsov committed Oct 13, 2023
1 parent f37e5f5 commit e63a165
Showing 1 changed file with 64 additions and 0 deletions.
64 changes: 64 additions & 0 deletions src/v/compat/cluster_json.h
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,38 @@ inline void rjson_serialize(
write_member(w, "retention_local_target_ms", tps.retention_local_target_ms);
write_member(w, "remote_delete", tps.remote_delete);
write_member(w, "segment_ms", tps.segment_ms);
write_member(
w,
"record_key_schema_id_validation",
tps.record_key_schema_id_validation);
write_member(
w,
"record_key_schema_id_validation_compat",
tps.record_key_schema_id_validation_compat);
write_member(
w,
"record_key_subject_name_strategy",
tps.record_key_subject_name_strategy);
write_member(
w,
"record_key_subject_name_strategy_compat",
tps.record_key_subject_name_strategy_compat);
write_member(
w,
"record_value_schema_id_validation",
tps.record_value_schema_id_validation);
write_member(
w,
"record_value_schema_id_validation_compat",
tps.record_value_schema_id_validation_compat);
write_member(
w,
"record_value_subject_name_strategy",
tps.record_value_subject_name_strategy);
write_member(
w,
"record_value_subject_name_strategy_compat",
tps.record_value_subject_name_strategy_compat);
w.EndObject();
}

Expand All @@ -586,6 +618,38 @@ inline void read_value(json::Value const& rd, cluster::topic_properties& obj) {
read_member(rd, "retention_local_target_ms", obj.retention_local_target_ms);
read_member(rd, "remote_delete", obj.remote_delete);
read_member(rd, "segment_ms", obj.segment_ms);
read_member(
rd,
"record_key_schema_id_validation",
obj.record_key_schema_id_validation);
read_member(
rd,
"record_key_schema_id_validation_compat",
obj.record_key_schema_id_validation_compat);
read_member(
rd,
"record_key_subject_name_strategy",
obj.record_key_subject_name_strategy);
read_member(
rd,
"record_key_subject_name_strategy_compat",
obj.record_key_subject_name_strategy_compat);
read_member(
rd,
"record_value_schema_id_validation",
obj.record_value_schema_id_validation);
read_member(
rd,
"record_value_schema_id_validation_compat",
obj.record_value_schema_id_validation_compat);
read_member(
rd,
"record_value_subject_name_strategy",
obj.record_value_subject_name_strategy);
read_member(
rd,
"record_value_subject_name_strategy_compat",
obj.record_value_subject_name_strategy_compat);
}

inline void rjson_serialize(
Expand Down

0 comments on commit e63a165

Please sign in to comment.