Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DGS-17857 Return subject in SchemaMetadata response (#65) #3286

Open
wants to merge 1 commit into
base: 7.6.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

public class SchemaMetadata {

private String subject;
private int id;
private int version;
private String schemaType;
Expand Down Expand Up @@ -56,6 +57,7 @@ public SchemaMetadata(int id,
}

public SchemaMetadata(Schema schema) {
this.subject = schema.getSubject();
this.id = schema.getId();
this.version = schema.getVersion();
this.schemaType = schema.getSchemaType();
Expand All @@ -65,6 +67,10 @@ public SchemaMetadata(Schema schema) {
this.ruleSet = schema.getRuleSet();
}

public String getSubject() {
return subject;
}

public int getId() {
return id;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,7 @@ private static void checkNormalization(SchemaRegistryClient schemaRegistry, Stri
Collection<String> subjects = schemaRegistry.getAllSubjects();
for (String subject : subjects) {
SchemaMetadata metadata = schemaRegistry.getLatestSchemaMetadata(subject);
assertEquals(metadata.getSubject(), subject);
Optional<ParsedSchema> schema = schemaRegistry.parseSchema(new Schema(subject, metadata));
ProtobufSchema proto = (ProtobufSchema) schema.get();
GenericDescriptor d = proto.toSpecificDescriptor(
Expand Down