On Thu, Feb 14, 2013 at 12:30 AM, Julien Silland <
jsil...@gmail.com> wrote:
> The protobuf IDL is represented at runtime by classes such as
> Descriptors.{Descriptor,FieldDescriptor, etc...} and all that data is
> available statically from the generated code. The library works with a
> message descriptor to create the equivalent JSON Schema, modulo some
> transforms that are configurable by the user. Parsing and serializing from
> and to JSON are also on the feature list. The use case we had was to expose
> internally-defined proto messages as JSON.
>
> Generating the IDL from a JSON schema seems hardly doable as the feature set
> of the JSON Schema spec is vastly greater than that of the protobuf IDL.
> For instance, I don't see how additionalItems could be represented in the
> protobuf IDL.
>
When your library is "out there", let me know: I'll write a processor
using it which means a protobuf can be taken as an input, generate a
JSON Schema and be used directly in the validation chain...
In the same vein, the first processor I'll write will be a
JJSchema-backed processor allowing to take a _class_ as an argument
and plug it directly in the validation chain.