Skip to content

Commit bf590f1

Browse files
committed
generate multiple java files
From https://protobuf.dev/reference/java/java-generated/#invocation When the option java_multiple_files = true is enabled, Then the compiler will also create separate .java files for each of the classes/enums which it will generate for each top-level message, enumeration, and service declared in the .proto file. The goal is to have this option stop generating "OuterClass" named classes for better ergonomics.
1 parent 895d1dd commit bf590f1

8 files changed

Lines changed: 8 additions & 0 deletions

File tree

authzed/api/v1/core.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package authzed.api.v1;
33

44
option go_package = "github.com/authzed/authzed-go/proto/authzed/api/v1";
55
option java_package = "com.authzed.api.v1";
6+
option java_multiple_files = true;
67

78
import "google/protobuf/struct.proto";
89
import "validate/validate.proto";

authzed/api/v1/debug.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import "google/protobuf/duration.proto";
88

99
option go_package = "github.com/authzed/authzed-go/proto/authzed/api/v1";
1010
option java_package = "com.authzed.api.v1";
11+
option java_multiple_files = true;
1112

1213
// DebugInformation defines debug information returned by an API call in a footer when
1314
// requested with a specific debugging header.

authzed/api/v1/error_reason.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package authzed.api.v1;
33

44
option go_package = "github.com/authzed/authzed-go/proto/authzed/api/v1";
55
option java_package = "com.authzed.api.v1";
6+
option java_multiple_files = true;
67

78
// Defines the supported values for `google.rpc.ErrorInfo.reason` for the
89
// `authzed.com` error domain.

authzed/api/v1/experimental_service.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package authzed.api.v1;
33

44
option go_package = "github.com/authzed/authzed-go/proto/authzed/api/v1";
55
option java_package = "com.authzed.api.v1";
6+
option java_multiple_files = true;
67

78
import "google/api/annotations.proto";
89
import "validate/validate.proto";

authzed/api/v1/openapi.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package authzed.api.v1;
33

44
option go_package = "github.com/authzed/authzed-go/proto/authzed/api/v1";
55
option java_package = "com.authzed.api.v1";
6+
option java_multiple_files = true;
67

78
import "protoc-gen-openapiv2/options/annotations.proto";
89

authzed/api/v1/permission_service.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package authzed.api.v1;
33

44
option go_package = "github.com/authzed/authzed-go/proto/authzed/api/v1";
55
option java_package = "com.authzed.api.v1";
6+
option java_multiple_files = true;
67

78
import "google/protobuf/struct.proto";
89
import "google/api/annotations.proto";

authzed/api/v1/schema_service.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package authzed.api.v1;
33

44
option go_package = "github.com/authzed/authzed-go/proto/authzed/api/v1";
55
option java_package = "com.authzed.api.v1";
6+
option java_multiple_files = true;
67

78
import "google/api/annotations.proto";
89
import "validate/validate.proto";

authzed/api/v1/watch_service.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package authzed.api.v1;
33

44
option go_package = "github.com/authzed/authzed-go/proto/authzed/api/v1";
55
option java_package = "com.authzed.api.v1";
6+
option java_multiple_files = true;
67

78
import "google/api/annotations.proto";
89
import "validate/validate.proto";

0 commit comments

Comments
 (0)