// css

gRPC Linting Styles, Kotlin support, and call private RPC


gRPC Linting mode

Adjust the gRPC Linting style to your API needs. You can select from prototool styles:

We also support Buf linter.

/release-v0.7/grpc-generation-settings.png

Kotlin gRPC snippets

GenDocu supports Kotlin code snippet generation. The Kotlin snippets use the Java SDK.

/release-v0.7/kotlin-grpc.png

OpenAPI defnition generation

We improved our SDK generator to generate REST API definition via grpc-gateway. This dependency is automatically included in the sources - just import google/api/annotations.proto or protoc-gen-openapiv2/options/annotations.proto to your protofile.

We automatically inject your REST API URL from GenDocu's API Spec and examples from the protobuf definition. You can find an example Swagger file here.

//This is file comments
syntax = "proto3";

//Some comment about go_package
option go_package = "github.com/gendocu-com/sample-client-sdk-repository/simple;xx";
package v1;

import "google/api/annotations.proto";

//some comment about Example Service
service ExampleService {
  //This is method comment
  rpc ExampleCall1(ExampleMessage1) returns(ReturnType) {
    option (google.api.http) = {
      get: "/v1/exampleservice/examplecall1"
    };
  }

  //This method has also comment
  rpc ExampleCall2(ExampleMessage2) returns(ReturnType) {
    option (google.api.http) = {
      post: "/v1/exampleservice/examplecall2"
    };
  }
}

// [Example]{"MyString": "My string value"}
message ExampleMessage1 {
  string MyString = 1;
}

/*
[Example]{"MyInt": 12, "m3": {"MyString": "xy"}} 
*/
message ExampleMessage2 {
  int32 MyInt = 1;
  // MyInt - Example trailing Comment
  message ExampleNested {
    bytes data = 1;
  }
  ExampleNested nested = 2;
  ExampleMessage1 m3 = 3;
}

/*
ReturnType - Empty Structure Placeholder
*/
message ReturnType {}

Private, non-Github source repository

We implemented support for any private git source repository. Now you can create a project directly from your private repository hosted on Gitlab, Bitbucket, or any other platform.

Try it for internal gRPC APIs

We have created an open source project - rpc-invoker. It is a proxy that converts the browser-friendly request to native gRPC requests. You can deploy it to your private network or your local machine to call any gRPC method directly from the documentation. You can read about it here.

The project is still experimental - let us know if you are interested in using it. We can assist you while improving the setup - use chat on https://gendocu.com.

spectype: gendocu
servers:
  - selector: "*"
    envs:
    - name: "private" 
      proxy: <proxy-url> # <---- here you define the proxy url
      urls:
      - grpc://<grpc-service-url> # local network address, might be ip or domain

Style improvements

We have introduced the separators for documentation and two new styling settings.

/release-v0.7/service-name-background.png