Code Monkey home page Code Monkey logo

protodoc's People

Contributors

ahrtr avatar ericchiang avatar gyuho avatar hexfusion avatar heyitsanthony avatar jmhbnz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

protodoc's Issues

parse service line errors

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?

ignore comments not attached to fields

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.