Skip to content

Commit

Permalink
Merge pull request #91 from RyoJerryYu/fix-annotation-update
Browse files Browse the repository at this point in the history
test: fix test for new fieldmask annotation
  • Loading branch information
RyoJerryYu authored Jan 18, 2025
2 parents bf26716 + 21e3958 commit 3086748
Show file tree
Hide file tree
Showing 11 changed files with 102 additions and 107 deletions.
4 changes: 2 additions & 2 deletions tests/protoc-gen-go-fieldmask/e2e/buf.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
version: v2
deps:
- name: buf.build/ryojerryyu/protoc-gen-pluginx
commit: fdd14fbc1f164ecf9196dee1fcea184f
digest: b5:18b4efa6b008b6a20bed9d1d1e61c5ef8b0e10d5be5deea0ed479dbac5556ed7df190ecb0d0b608c9af48d59cb9082c355cd53b7fc8ee5c868d93f881692364e
commit: 4735a7a4a5064c618dd1ef7a6ac97240
digest: b5:8e5f8fb40a6339a69e6a62ac5fc824cd175e0f069609731772c67287aeeb54da5d17e3f3b4d1d92bf8bccd25a1decadc7ad14706cccb04f0047cae80526e4146

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 22 additions & 23 deletions tests/protoc-gen-go-fieldmask/e2e/proto/feed/feed.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions tests/protoc-gen-go-fieldmask/e2e/proto/feed/feed.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ syntax = "proto3";

package api.v1.feed;

option go_package = "github.com/RyoJerryYu/protoc-gen-pluginx/tests/protoc-gen-go-fieldmask/e2e/proto/feed";

import "google/protobuf/timestamp.proto";
import "proto/user/user.proto";
import "ryojerryyu/annotations/annotations.proto";
import "ryojerryyu/annotations/fieldmask.proto";

option go_package = "github.com/RyoJerryYu/protoc-gen-pluginx/tests/protoc-gen-go-fieldmask/e2e/proto/feed";

message Feed {
string id = 1;
string title = 2;
user.User author = 4;
google.protobuf.Timestamp created_at = 5;
string id = 1;
string title = 2;
user.User author = 4;
google.protobuf.Timestamp created_at = 5;

user.Icon.Nested nested_from_other = 6;
}
user.Icon.Nested nested_from_other = 6;
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

78 changes: 39 additions & 39 deletions tests/protoc-gen-go-fieldmask/e2e/proto/user/user.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 3 additions & 7 deletions tests/protoc-gen-go-fieldmask/e2e/proto/user/user.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package api.v1.user;

import "google/protobuf/timestamp.proto";
import "proto/user/user_password.proto";
import "ryojerryyu/annotations/annotations.proto";
import "ryojerryyu/annotations/fieldmask.proto";

option go_package = "github.com/RyoJerryYu/protoc-gen-pluginx/tests/protoc-gen-go-fieldmask/e2e/proto/user";

Expand All @@ -13,9 +13,7 @@ message User {
string name = 2;
Icon icon = 3;
UserPassword password = 4;
google.protobuf.Timestamp created_at = 5 [(ryojerryyu.annotations.field_mask) = {
field_mask: {end: true}
}];
google.protobuf.Timestamp created_at = 5 [(ryojerryyu.annotations.field_mask) = {end: true}];
}

message Icon {
Expand All @@ -29,7 +27,5 @@ message Icon {

Nested nested = 4;

Nested nested_another = 5 [(ryojerryyu.annotations.field_mask) = {
field_mask: {end: true}
}];
Nested nested_another = 5 [(ryojerryyu.annotations.field_mask) = {end: true}];
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 3086748

Please sign in to comment.