Replies: 1 comment 1 reply
-
you can definitely do that, TypeSpec was designed with this scenario in mind. You do have to be mindful of course of how certain protocol might require certain structure(specially around operations) so you don't affect others but otherwise it should definitely work. We have this example here showcasing multiple emitters https://typespec.io/multi-protocol |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, there. I'm new to typespec and I'd like to use typespec for defining messaging protos for my project. I'm using restful api for message between my frontend and my api server, and protobuf for my api server and other microservices.
I'm wondering if I can reuse models and enums to emitting different representations for openapi and protobuf. For example:
Beta Was this translation helpful? Give feedback.
All reactions