You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying out the custom option feature but I am not able to get it work. I am running 7.5.0 schema registry as well as client library version.
Here is my test schema:
// Fetch the schema object of type ParsedSchema from some existing client code using the client library.
ProtobufSchema protobufSchema = (ProtobufSchema) schema;
Descriptors.Descriptor descriptor = protobufSchema.toDescriptor();
for (Descriptors.FieldDescriptor field : descriptor.getFields()) {
logger.atInfo().log("options: " + field.getOptions());
}
// No options showup in the result
Here is my debugging process and some result for troubleshooting:
I debug into the problem and it seems the field_custom1 option appear in the ProtobufSchema.schemaObj
however, after calling toDescriptor, the field option can not be retained.
On a further inspection, At this line the options showup but the field option can not be retained because the field option is evaluated for certain types including ctype, jstype, deprecated, etc. They are all null in my case and it can not be invoked to merge the options (reference code)
I am not sure if I miss something in this logic, the example I use is part of the test in this original PR. Do I need some special config to make this work?
The text was updated successfully, but these errors were encountered:
I am trying out the custom option feature but I am not able to get it work. I am running 7.5.0 schema registry as well as client library version.
Here is my test schema:
Here is my test code:
Here is my debugging process and some result for troubleshooting:
field_custom1
option appear in the ProtobufSchema.schemaObjctype
,jstype
,deprecated
, etc. They are allnull
in my case and it can not be invoked to merge the options (reference code)I am not sure if I miss something in this logic, the example I use is part of the test in this original PR. Do I need some special config to make this work?
The text was updated successfully, but these errors were encountered: