etcd-io / protodoc Goto Github PK
View Code? Open in Web Editor NEWprotodoc generates Protocol Buffer documentation.
License: Apache License 2.0
protodoc generates Protocol Buffer documentation.
License: Apache License 2.0
hi:
in my *.proto
file, the code snippet defined below
// first request.
rpc HalfDuplexCall(CreatePjsipEndpointRequest)
returns (CreatePjsipEndpointResponse);
if call protodoc --directory=./ --parse="service,message" --languages="Go,C++,Java,Python" --title=testdata --output=sample.md
to generate doc, it will be crash.
panic: runtime error: index out of range
goroutine 1 [running]:
github.com/coreos/protodoc/parse.ReadFile(0xc420014860, 0xb, 0xc42004fa38, 0x6, 0xc42001a930)
/home/seanchann/source/golang/src/github.com/coreos/protodoc/parse/parse.go:233 +0x1293
github.com/coreos/protodoc/parse.ReadDir(0x7ffecb1711ab, 0x2, 0x0, 0x0, 0x6, 0x0, 0x660420)
/home/seanchann/source/golang/src/github.com/coreos/protodoc/parse/parse.go:82 +0x1a0
main.CommandFunc(0x65dbc0, 0xc420016230, 0x0, 0x5, 0x0, 0x0)
/home/seanchann/source/golang/src/github.com/coreos/protodoc/main.go:124 +0x7e3
github.com/spf13/cobra.(*Command).execute(0x65dbc0, 0xc4200101f0, 0x5, 0x5, 0x65dbc0, 0xc4200101f0)
/home/seanchann/source/golang/src/github.com/spf13/cobra/command.go:650 +0x457
github.com/spf13/cobra.(*Command).ExecuteC(0x65dbc0, 0xc4200101d8, 0x0, 0x0)
/home/seanchann/source/golang/src/github.com/spf13/cobra/command.go:729 +0x339
github.com/spf13/cobra.(*Command).Execute(0x65dbc0, 0x14, 0x48)
/home/seanchann/source/golang/src/github.com/spf13/cobra/command.go:688 +0x2b
main.main()
/home/seanchann/source/golang/src/github.com/coreos/protodoc/main.go:173 +0x31
it seem not support multiple line define for a rpc api?
This breaks the doc-generating for etcd.
message RangeRequest {
enum SortOrder {
NONE = 0; // default, no sorting
ASCEND = 1; // lowest target value first
DESCEND = 2; // highest target value first
}
enum SortTarget {
KEY = 0;
VERSION = 1;
CREATE = 2;
MOD = 3;
VALUE = 4;
}
// key is the first key for the range. If range_end is not given, the request only looks up key.
bytes key = 1;
gives a description for key
:
default, no sorting lowest target value first highest target value first key is the first key for the range. If range_end is not given, the request only looks up key.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.