Skip to content

Support for Kotlin DSL style builders #83

@dariuszkuc

Description

@dariuszkuc

Instead of relying on Java builders it would be great if this library supported Kotlin DSL, e.g. given

service HelloWorldAPI {
    rpc HelloWorld(HelloWorldRequest) returns (HelloWorldResponse);
}

message HelloWorldRequest {
    string hello_message = 1;
}

message HelloWorldResponse {
    string hello_response = 1;
}

It would be great if we could construct proto objects as

val hello = HelloWorldRequest {
  helloMessage = "hello"
}

instead of using ugly Java builders

val hello = HelloWorldRequest.newBuilder()
  .setHelloMessage("hello")
  .build()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions