Coder Social home page Coder Social logo

protodoc-scala's Introduction

ProtoDoc - It's like JavaDoc, but for Google Protocol Buffers

Have you ever worked with a BIG Protocol Buffers based application? It would be awesome if it had some kind of tool like JavaDoc, to always know what each field exactly means, even without having the proto file at hand right now.

Oh, wait. That's excatly what ProtoDoc is! ProtoDoc is a tool very much like JavaDoc, which scans your proto files and generates an easily searchable and most informative website with all information about yout ProtoMessages.

It's currently not production ready, and allows only for basic Messages to be parsed. But it should most probably be finished and fully working quite soon.

Live Demo

There is a live demo available here.

Coding notes

  • ProtoDoc is build by SBT so if you want to help out hacking, first download Scala 2.8.1 and sbt :-)

Output screenshots

ProtoDoc takes this:

package pl.project13;

/**
 * This is a simple Message which has some Inner Message defined.
 * Also, note that it has a default value on the name property.
 */
message MessageWithInner {
    /**
     * A number is just a simple property
     */
    required int32 number = 1;

    /**
     * This can be a name of your likeing, the default value is "lorem ipsum" etc
     */
    required string name = 2 [default = "loremipsum"];


    /**
     * Whoa, this is a comment on an inner message!
     * ProtoDoc is so cool!
     */
    message InnerMessage {

        /**
         * This is a comment on an inner messages field, cool~<br/>
         * <br/>
         * You may use it like this in your generated Java code:
         * <pre><code> setName("StringMyName");</code></pre>
         */
        optional string name = 3;
    }
}

and generates this:

protodoc sample


Hooray!

protodoc-scala's People

Contributors

ktoso avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

feijosamba

protodoc-scala's Issues

Support "import"

Allow importing of other proto files:

File A.proto

message A {}

File B.proto

import "A.proto";

message B {
  required A field = 1;
}

Support multiple files

And in them, it should be possible to cross refer multiple field types (an Message in A.proto can use a Message in B.proto)

Support "option"

Such as in:

package pl.project13;

option java_package = "pl.project13.protodoc";

message Msg {}

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.