TheThingsArchive / api

Generated code for accessing The Things Network v2 API
MIT License
12 stars 8 forks source link

Feature request: Kotlin #43

Closed jpmeijers closed 3 years ago

jpmeijers commented 3 years ago

Please add Kotlin data classes.

I have tried compiling the proto files from https://github.com/TheThingsNetwork/lorawan-stack/tree/v3.10/api using https://github.com/streem/pbandk, but I end up getting errors which I do not know how to fix, and I'm also not sure if it is possible to fix them.

protoc --proto_path=/usr/local/include --proto_path=. --kotlin_out=ttiv3proto lorawan-stack/api/messages.proto 
github.com/envoyproxy/protoc-gen-validate/validate/validate.proto: File not found.
github.com/gogo/protobuf/gogoproto/gogo.proto: File not found.
lorawan-stack/api/error.proto:17:1: Import "github.com/gogo/protobuf/gogoproto/gogo.proto" was not found or had errors.
lorawan-stack/api/identifiers.proto:17:1: Import "github.com/envoyproxy/protoc-gen-validate/validate/validate.proto" was not found or had errors.
lorawan-stack/api/identifiers.proto:18:1: Import "github.com/gogo/protobuf/gogoproto/gogo.proto" was not found or had errors.
lorawan-stack/api/keys.proto:17:1: Import "github.com/envoyproxy/protoc-gen-validate/validate/validate.proto" was not found or had errors.
lorawan-stack/api/keys.proto:18:1: Import "github.com/gogo/protobuf/gogoproto/gogo.proto" was not found or had errors.
lorawan-stack/api/lorawan.proto:17:1: Import "github.com/envoyproxy/protoc-gen-validate/validate/validate.proto" was not found or had errors.
lorawan-stack/api/lorawan.proto:18:1: Import "github.com/gogo/protobuf/gogoproto/gogo.proto" was not found or had errors.
lorawan-stack/api/lorawan.proto:21:1: Import "lorawan-stack/api/identifiers.proto" was not found or had errors.
lorawan-stack/api/lorawan.proto:285:3: "GatewayIdentifiers" is not defined.
lorawan-stack/api/enums.proto:19:1: Import "github.com/gogo/protobuf/gogoproto/gogo.proto" was not found or had errors.
lorawan-stack/api/metadata.proto:17:1: Import "github.com/envoyproxy/protoc-gen-validate/validate/validate.proto" was not found or had errors.
lorawan-stack/api/metadata.proto:18:1: Import "github.com/gogo/protobuf/gogoproto/gogo.proto" was not found or had errors.
lorawan-stack/api/metadata.proto:22:1: Import "lorawan-stack/api/enums.proto" was not found or had errors.
lorawan-stack/api/metadata.proto:23:1: Import "lorawan-stack/api/identifiers.proto" was not found or had errors.
lorawan-stack/api/metadata.proto:34:3: "GatewayIdentifiers" is not defined.
lorawan-stack/api/metadata.proto:62:3: "DownlinkPathConstraint" is not defined.
lorawan-stack/api/messages.proto:17:1: Import "github.com/envoyproxy/protoc-gen-validate/validate/validate.proto" was not found or had errors.
lorawan-stack/api/messages.proto:18:1: Import "github.com/gogo/protobuf/gogoproto/gogo.proto" was not found or had errors.
lorawan-stack/api/messages.proto:22:1: Import "lorawan-stack/api/error.proto" was not found or had errors.
lorawan-stack/api/messages.proto:23:1: Import "lorawan-stack/api/identifiers.proto" was not found or had errors.
lorawan-stack/api/messages.proto:24:1: Import "lorawan-stack/api/keys.proto" was not found or had errors.
lorawan-stack/api/messages.proto:25:1: Import "lorawan-stack/api/lorawan.proto" was not found or had errors.
lorawan-stack/api/messages.proto:26:1: Import "lorawan-stack/api/metadata.proto" was not found or had errors.
lorawan-stack/api/messages.proto:76:3: "Message" is not defined.
lorawan-stack/api/messages.proto:77:3: "TxSettings" is not defined.
lorawan-stack/api/messages.proto:78:12: "RxMetadata" is not defined.
lorawan-stack/api/messages.proto:136:3: "Message" is not defined.
lorawan-stack/api/messages.proto:137:3: "EndDeviceIdentifiers" is not defined.
lorawan-stack/api/messages.proto:141:5: "TxRequest" is not defined.
lorawan-stack/api/messages.proto:142:5: "TxSettings" is not defined.
lorawan-stack/api/messages.proto: "Location" is not defined.
lorawan-stack/api/messages.proto:188:12: "RxMetadata" is not defined.
lorawan-stack/api/messages.proto:191:3: "TxSettings" is not defined.
lorawan-stack/api/messages.proto:200:3: "KeyEnvelope" is not defined.
lorawan-stack/api/messages.proto:220:3: "Location" is not defined.
lorawan-stack/api/messages.proto:228:3: "KeyEnvelope" is not defined.
lorawan-stack/api/messages.proto:266:14: "GatewayAntennaIdentifiers" is not defined.
lorawan-stack/api/messages.proto:278:3: "TxSchedulePriority" is not defined.
lorawan-stack/api/messages.proto:291:3: "ErrorDetails" is not defined.
lorawan-stack/api/messages.proto:305:3: "EndDeviceIdentifiers" is not defined.
lorawan-stack/api/messages.proto:355:3: "EndDeviceIdentifiers" is not defined.
rvolosatovs commented 3 years ago
github.com/envoyproxy/protoc-gen-validate/validate/validate.proto: File not found.
github.com/gogo/protobuf/gogoproto/gogo.proto: File not found.

You are missing proto definitions from https://github.com/gogo/protobuf and https://github.com/envoyproxy/protoc-gen-validate It should work if you make includes from these 2 available at compilation time

htdvisser commented 3 years ago

I'm going to close this issue. We're not going to address it anymore, as V2 is going to shut down in December.