firecamp-io / firecamp

VSCode for APIs, Postman Alternative.
https://firecamp.dev
317 stars 22 forks source link

Protobuf Proto2 Syntax Support #107

Open AlexVPerl opened 4 years ago

AlexVPerl commented 4 years ago

Please add Proto2 syntax support for Protobuf requests.

Seems Proto3 is supported but not Proto2.

Thanks.

welcome[bot] commented 4 years ago

Welcome to the Firecamp! Thanks and congrats for opening your very first issue in Firecamp. Join the Discord community here https://discord.gg/8hRaqhK Hope you have a great time here :)

pranavwani commented 4 years ago

@AlexVPerl Thanks for sharing. Proto2 support added. Still, Protocol Buffer as a request body is in the beta stage. We will try to improve the flow to use it.

Protobufv2

AlexVPerl commented 4 years ago

Thanks @pranavwani

In the Gif you posted I see syntax=Proto2, is that available in the public build or just in the beta?

pranavwani commented 4 years ago

Yes, it is shipped with today's release v1.2.2 as API client in Beta stage

AlexVPerl commented 4 years ago

Oh wow, that was quick! Will give it a try today :)

AlexVPerl commented 4 years ago

@pranavwani - just tried the lateset 1.2.2 version, but still unable to see Encoded & Decoded Message Type drop down boxes.

Nishchit14 commented 4 years ago

@AlexVPerl Can you please share the sample proto schema here or in Discord privately if possible?

AlexVPerl commented 4 years ago

Here you go: https://developers.google.com/transit/gtfs-realtime/gtfs-realtime-proto

Nishchit14 commented 4 years ago

@AlexVPerl I have copied it and paste in .Ptotobuf Schema tab and came back to the Boday part as shown in this image. and you can see the dropdown with all available messages from proto-schema.

image

please let me know if you're still facing any issue, I am on v1.2.2 Mac.

AlexVPerl commented 4 years ago

@Nishchit14 - what could I be doing wrong then? I can't get the drop downs to show up at all, tried white & dark mode, maximizing window, using v1.2.2

pranavwani commented 4 years ago

@AlexVPerl Sorry for the inconvenience, it has some issues while using it.

  1. On every request open or reopen the app time, we have to update the schema once to link with the request. Schema is there but we have to edit it like pressing enter or select all + cut + paste. Then after you can see the encode and decode dropdowns.

  2. Complex schema like n-level of nested messages. Currently, 1-level supported.

  3. Schema with import statement does not work properly. Actually flow will change to link schema in the future to support schema with import statement.

  4. Auto-generate payload on selecting the type.

To provide the protobuf support with the Rest API require lots of improvements.

@AlexVPerl we will try to improve it ASAP.

Nishchit14 commented 4 years ago

Thank you for sharing it @pranavwani 👏 , @AlexVPerl if you're in discord channel just send me Hi, I'll arrange a personal demo for you by sharing the screen possibly :)

Nishchit14 commented 4 years ago

Released with https://github.com/firecampapp/Firecamp/releases/tag/1.4.0

Todo: Check it with the most complex schema, I'll close this issue after being sure about it.