Package dev.enola.common.protobuf.schema
Class MessageDescriptorToSchemaConverter
java.lang.Object
dev.enola.common.protobuf.schema.MessageDescriptorToSchemaConverter
Conversion from Protocol Buffers (model, not instances) to Google
GenAI Schema (which is based on OpenAPI 3.0 schema, which in turn
is very much like JSON Schema).
The Schema matches how a Proto message (instance, not model) would be serialized in ProtoJSON format.
Other than just being 💃 fun, this is (very) useful to be able to 🧑🏽🍼 feed 🥄 Language Models, such as Google 🔮 Gemini, 🥢 Protos instead of only 📜 text, for 🧰 tools (whether through MCP 🔱 or not), or to configure their expected structured output.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
MessageDescriptorToSchemaConverter
public MessageDescriptorToSchemaConverter()
-
-
Method Details
-
convert
-
convert
-