protobuf-schema.model.mustache Maven / Gradle / Ivy
{{>partial_header}}
syntax = "proto3";
package {{#lambda.lowercase}}{{{packageName}}};{{/lambda.lowercase}}
{{#imports}}
{{#import}}
import public "{{{modelPackage}}}/{{{import}}}.proto";
{{/import}}
{{/imports}}
{{#models}}
{{#model}}
{{#isEnum}}{{>enum}}{{/isEnum}}{{^isEnum}}message {{classname}} {
{{#vars}}
{{#description}}
// {{{.}}}
{{/description}}
{{^isEnum}}
{{#vendorExtensions.x-protobuf-type}}{{{.}}} {{/vendorExtensions.x-protobuf-type}}{{{vendorExtensions.x-protobuf-data-type}}} {{{name}}} = {{vendorExtensions.x-protobuf-index}}{{#vendorExtensions.x-protobuf-packed}} [packed=true]{{/vendorExtensions.x-protobuf-packed}};
{{/isEnum}}
{{#isEnum}}
enum {{enumName}} {
{{#allowableValues}}
{{#enumVars}}
{{{name}}} = {{{protobuf-enum-index}}};
{{/enumVars}}
{{/allowableValues}}
}
{{enumName}} {{name}} = {{vendorExtensions.x-protobuf-index}};
{{/isEnum}}
{{/vars}}
}
{{/isEnum}}
{{/model}}
{{/models}}