title: Spring webflux Netty: How to expose proto as json endpoints without duplication of code?
body: <p>Use-case:</p>
  <p>Developers/I, want to only implement a Protobuf implementation (binary protocol). However, I need a way to add config, so, the same implementation is exposed as rest/json api as well -- <strong>without code duplication</strong>.</p>
  <p>I have proto endpoints exposed. I also want consumers to <strong>post</strong> json equivalent of those proto objects and return/receive json equivalent of the results with type info (Pojo?). The type info helps with OpenAPI / Swagger documentation too!</p>
  <p>What are the most elegant/simple ways to achieve that without code duplication?</p>
  <p>Any example github code that achieves that would be helpful.</p>
  <p><strong>Note: This is for webflux &amp; netty</strong> - no tomcat.</p>
  <p>ProtobufJsonFormatHttpMessageConverter  - works for tomcat, does not work for netty. A working example code would be great.</p>
  <p><a href="https://i.stack.imgur.com/98ZC6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/98ZC6.png" alt="enter image description here" /></a></p>