ImFlog/schema-registry-plugin

Handle local references for Protobuf

Closed this issue · 5 comments

As in #71 but for Protobuf

Jtalk commented

Hey @ImFlog, I patched local reference support for Protobuf into your plugin for our use at EF. Our version is heavily modified, but I could try & put together an upstream-compatible PR if you're interested.

A few important caveats:

  • It requires a new dependency (Square's wire-schema, we use Wire to parse Protobuf)
  • It doesn't allow name clashes in refs: each ref's messages/enums must be unique. It works in a similar way to how your JSON Schema implementation does: we scrape dependencies & build a single .proto file, rewriting package modifiers. Therefore having name clashes, even across different packages, is not supported.
  • RPC and Extensions are not supported: they'll be retained, but no package overwrite will happen inside them. We don't use these, someone else could add it later if they want.

Let me know what you think.

ImFlog commented

Hello @Jtalk,
That would be awesome if you could contribute this ! I looked upon this before but found nothing (I am not very familiar with protobuf).
I've not spent a lot of time on the plugin lately as it works well but I would love to get this feature done, that would make the plugin more or less feature complete 😍
Happy to take a look, feel free to open a PR.

ImFlog commented

Hi @Jtalk, are you still interested in contributing this ?

No rush, you sparkled my interest and I really want to add this now :) Just want to make sure you are still OK for it.

If not maybe you can give me snippets to help ?

Jtalk commented

Hey @ImFlog, yes, absolutely. It's on my roadmap, don't worry. =)

I'm busy with a time-sensitive delivery right now, but I should have some time in early December.

@ImFlog there's been a slight delay, but I still remember about it, hopefully I'll come round by Jan