You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on a project that only a few of the protos are used for the pubsub. I'd like to generate pubsub scheme only for those protos but it generates it also for all its imported types.
What I did is to create a separate generation template buf.pubsub.gen.yaml not to generate pubsub inlines for all the protos yet I couldn't exclude the sub types.
proto
└── org
└── example
└── eventsystem
└── event
└── v1
├── event.proto
├── event_data.proto
└── service.proto
event.proto
syntax="proto3";
packagecom.example.eventsystem.event.v1;
import"com.example.eventsystem/event/v1/event_data.proto";
import"google/protobuf/timestamp.proto";
// Represents a generic event that can carry various types of event data.messageEvent {
// A unique identifier for this event.stringid=1;
// The name of the event.stringname=2;
// The user identifier associated with this event.stringuser_id=3;
// The source of the event (e.g., "web", "mobile", "system").stringsource=4;
// The timestamp indicating when the event was created.google.protobuf.Timestampcreated_at=5;
// A oneof field containing different types of event data.oneofevent_data {
com.example.eventsystem.event.v1.EventDataEmptyemptyEvent=9;
com.example.eventsystem.event.v1.EventDataEvent1event1=10;
com.example.eventsystem.event.v1.EventDataEvent2event2=11;
com.example.eventsystem.event.v1.EventDataEvent3event3=12;
com.example.eventsystem.event.v1.EventDataEvent4event4=13;
com.example.eventsystem.event.v1.EventDataEvent5event5=14;
com.example.eventsystem.event.v1.EventDataEvent6event6=15;
}
}
Hello!
Thank you for the great work!
I'm working on a project that only a few of the protos are used for the pubsub. I'd like to generate pubsub scheme only for those protos but it generates it also for all its imported types.
What I did is to create a separate generation template
buf.pubsub.gen.yaml
not to generate pubsub inlines for all the protos yet I couldn't exclude the sub types.buf.yaml
buf.pubsub.gen.yaml
Proto directory structure:
event.proto
event_data.proto
Generated proto:
From these I only need
com.example.eventsystem.event.v1.Event.pubsub.proto
, Is it possible to only generate this one?The text was updated successfully, but these errors were encountered: