File tree Expand file tree Collapse file tree 2 files changed +51
-1
lines changed
Expand file tree Collapse file tree 2 files changed +51
-1
lines changed Original file line number Diff line number Diff line change 1+ # Protocol Documentation
2+ {{range .Files}}
3+ {{$file_name := .Name}}
4+ <a name="{{.Name | anchor}}"></a>
5+
6+ ## {{.Name}}
7+ {{.Description}}
8+
9+ {{range .Messages}}
10+ <a name="{{.FullName | anchor}}"></a>
11+
12+ ### {{.LongName}}
13+ {{.Description}}
14+
15+ {{ if .HasFields}}
16+ | Field | Type | Description |
17+ | ------| ---- | ----------- |
18+ {{range .Fields -}}
19+ | {{if .IsOneof -}}<small>{{if eq .OneofDecl (printf "_%s" .Name)}}<strong>optional</strong>{{else}}<strong>oneof</strong> <code>{{.OneofDecl}}</code>{{end}}</small><br>{{end}}{{.Name}} {{/* noline */ -}}
20+ | [{{if .IsMap}}map{{else}}{{.Label}} {{end}}{{.LongType}}](#{{.FullType | anchor}}) {{/* noline */ -}}
21+ | {{if (index .Options "deprecated" | default false)}}**deprecated**<br>{{end}}{{if .Description}}{{.Description | replace "\n" "<br>"}}{{end}} {{/* noline */ -}}
22+ |
23+ {{end}}{{/* range .Fields */}}
24+ {{- end}}{{/* if .HasFields */}}
25+ {{- end}}{{/* range .Messages */}}
26+
27+ {{range .Enums}}
28+ <a name="{{.FullName | anchor}}"></a>
29+
30+ ### {{.LongName}}
31+ {{.Description}}
32+
33+ | Name | Number | Description |
34+ | ---- | ------ | ----------- |
35+ {{range .Values -}}
36+ | {{.Name}} | {{.Number}} | {{nobr .Description}} |
37+ {{end}}
38+
39+ {{end}}
40+
41+ {{- end}}{{/* range .Files */}}
42+
43+ ## Scalar Value Types
44+
45+ | .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby |
46+ | ----------- | ----- | --- | ---- | ------ | -- | -- | --- | ---- |
47+ {{range .Scalars -}}
48+ | <a name="{{.ProtoType | anchor}}" /> {{.ProtoType}} | {{.Notes}} | {{.CppType}} | {{.JavaType}} | {{.PythonType}} | {{.GoType}} | {{.CSharp}} | {{.PhpType}} | {{.RubyType}} |
49+ {{end}}
Original file line number Diff line number Diff line change @@ -4,7 +4,8 @@ echo "Generating Markdown documentation $(pwd)/docs/markdown/protocol.md"
44docker run --rm \
55 -v $( pwd) /docs/markdown:/out \
66 -v $( pwd) /protobuf_definitions:/protos \
7- pseudomuto/protoc-gen-doc --doc_opt=markdown,protocol.md
7+ -v $( pwd) /markdown.tmpl:/markdown.tmpl \
8+ pseudomuto/protoc-gen-doc --doc_opt=markdown.tmpl,protocol.md
89
910echo " Generating HTML documentation $( pwd) /docs/html/protocol.html"
1011docker run --rm \
You can’t perform that action at this time.
0 commit comments