Skip to content

Commit

Permalink
Merge pull request #97 from authzed/java-multiple-files-option
Browse files Browse the repository at this point in the history
generate multiple java files
  • Loading branch information
vroldanbet authored May 2, 2024
2 parents 435e22f + db4a5c7 commit 767f6e4
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 3 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ on:
- "*"
jobs:
lint:
name: "Lint"
name: "Lint & Publish Draft/Branch"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v3"
- uses: "authzed/actions/yaml-lint@main"
- uses: "bufbuild/buf-setup-action@v1"
- uses: "bufbuild/buf-setup-action@v1.30.0"
with:
version: "1.22.0"
version: "1.30.0"
- uses: "bufbuild/buf-lint-action@v1"
- uses: "bufbuild/buf-breaking-action@v1"
if: "github.event_name == 'pull_request'"
Expand All @@ -33,3 +33,15 @@ jobs:
env:
BUF_TOKEN: "${{ secrets.BUF_REGISTRY_TOKEN }}"
run: "buf push --draft ${{ github.sha }}"
- name: "Push to BSR a Draft"
if: "github.event_name == 'push' && github.ref == 'refs/heads/main'"
shell: "bash"
env:
BUF_TOKEN: "${{ secrets.BUF_REGISTRY_TOKEN }}"
run: "buf push --draft ${{ github.sha }}"
- name: "Push to BSR a Branch"
if: "github.event_name == 'push' && github.ref != 'refs/heads/main'"
shell: "bash"
env:
BUF_TOKEN: "${{ secrets.BUF_REGISTRY_TOKEN }}"
run: "buf push --branch ${{ github.sha }}"
1 change: 1 addition & 0 deletions authzed/api/v1/core.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package authzed.api.v1;

option go_package = "github.com/authzed/authzed-go/proto/authzed/api/v1";
option java_package = "com.authzed.api.v1";
option java_multiple_files = true;

import "google/protobuf/struct.proto";
import "validate/validate.proto";
Expand Down
1 change: 1 addition & 0 deletions authzed/api/v1/debug.proto
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import "google/protobuf/duration.proto";

option go_package = "github.com/authzed/authzed-go/proto/authzed/api/v1";
option java_package = "com.authzed.api.v1";
option java_multiple_files = true;

// DebugInformation defines debug information returned by an API call in a footer when
// requested with a specific debugging header.
Expand Down
1 change: 1 addition & 0 deletions authzed/api/v1/error_reason.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package authzed.api.v1;

option go_package = "github.com/authzed/authzed-go/proto/authzed/api/v1";
option java_package = "com.authzed.api.v1";
option java_multiple_files = true;

// Defines the supported values for `google.rpc.ErrorInfo.reason` for the
// `authzed.com` error domain.
Expand Down
1 change: 1 addition & 0 deletions authzed/api/v1/experimental_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package authzed.api.v1;

option go_package = "github.com/authzed/authzed-go/proto/authzed/api/v1";
option java_package = "com.authzed.api.v1";
option java_multiple_files = true;

import "google/api/annotations.proto";
import "validate/validate.proto";
Expand Down
1 change: 1 addition & 0 deletions authzed/api/v1/openapi.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package authzed.api.v1;

option go_package = "github.com/authzed/authzed-go/proto/authzed/api/v1";
option java_package = "com.authzed.api.v1";
option java_multiple_files = true;

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

Expand Down
1 change: 1 addition & 0 deletions authzed/api/v1/permission_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package authzed.api.v1;

option go_package = "github.com/authzed/authzed-go/proto/authzed/api/v1";
option java_package = "com.authzed.api.v1";
option java_multiple_files = true;

import "google/protobuf/struct.proto";
import "google/api/annotations.proto";
Expand Down
1 change: 1 addition & 0 deletions authzed/api/v1/schema_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package authzed.api.v1;

option go_package = "github.com/authzed/authzed-go/proto/authzed/api/v1";
option java_package = "com.authzed.api.v1";
option java_multiple_files = true;

import "google/api/annotations.proto";
import "validate/validate.proto";
Expand Down
1 change: 1 addition & 0 deletions authzed/api/v1/watch_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package authzed.api.v1;

option go_package = "github.com/authzed/authzed-go/proto/authzed/api/v1";
option java_package = "com.authzed.api.v1";
option java_multiple_files = true;

import "google/api/annotations.proto";
import "validate/validate.proto";
Expand Down
3 changes: 3 additions & 0 deletions buf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@ deps:
lint:
ignore:
- "authzed/api/v0" # legacy from before we used buf
breaking:
use:
- "WIRE_JSON"

0 comments on commit 767f6e4

Please sign in to comment.