Interactions-HSG / grpcwot

A simple command line tool to generate a Thing Description from Protocol Buffers
GNU General Public License v3.0
0 stars 0 forks source link

Link Messages to RPC #5

Closed S-Eibl closed 2 years ago

S-Eibl commented 2 years ago

The emicklei/proto parses RPC functions with their Name, Comments, etc. The RequestType and ResponseType are stored as strings but should be linked to the corresponding messages. This is necessary to determine request- and return type for the thing description later. Therefor the following steps are necessary:

iomz commented 2 years ago

How is this issue different from #3?

The protoparser parses RPC functions with their Name, Comments, etc. The RequestType and ResponseType are stored as strings but should be linked to the corresponding messages. This is necessary to determine request- and return type for the thing description later. Therefor the following steps are necessary:

OK, now I'm getting finer image of what you are trying to do, but not entirely sure, yet. I will pay visits to other younger issues.

iomz commented 2 years ago

Instead of creating a map before constructing the resulting TD, I would dynamically generate forms as the each handler Walk the protobuf.

iomz commented 2 years ago

My bad, you are right. It is indeed a bad idea to recursively find the Message for each RPC function.

I am first creating a map of the Message name and the wot.DataSchema type.