-
I'm using Confluent Schema Registry (CSR) to store and distribute Protobuf schemas, along with the Buf CLI to lint and check for breaking changes in service schemas. ProblemWhen a schema containing a map is registered in CSR, the map field is transformed into a map_entry message with For example, a schema like this:
After registration in CSR, it transforms into:
When another schema imports this transformed version, Buf fails any lint or breaking command due to the modification. QuestionIs there a way to ignore the |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
The So in this particular case, I would suggest not depending on any schemas that are being pulled from a version of the CSR that emits the map entry messages with the To address the broader use-case of excluding options when working with schemas, we are currently working on a feature to configure excluding options when generating code with |
Beta Was this translation helpful? Give feedback.
-
Thanks for your answer, @doriable. It seems like these changes were reverted, but thank you for pointing me in this direction |
Beta Was this translation helpful? Give feedback.
The
map_entry
option is a restricted option, so the build is failing because it's a compiler restriction (it would fail withprotoc
also). There appears to be a fix in the CSR for schemas to emit a proper map type, even when normalization is not enabled: confluentinc/schema-registry#3444So in this particular case, I would suggest not depending on any schemas that are being pulled from a version of the CSR that emits the map entry messages with the
map_entry
option set and checking your CSR versions and configurations.To address the broader use-case of excluding options when working with schemas, we are currently working on a feature to configure excluding options when generating code with