Closed YannLee1208 closed 1 year ago
It looks like the init in the Makefile is not updated, let me check
In the past, we included all the IDL of the http part with an api.proto, and later we split it and deleted the api.proto, so now we only need to use the command in generate, and I will update README later. If you are interested you can submit a PR to help us fix this issue.
So to produce the api
folder by hz command, which idl profile we need to specify?
Or maybe just hz new -mod xxx/cmd/api
? So when do we use the IDL files in idl/http/*
, because as I see folds like cmd/car
are generated by kitex for RPC services.
You can define an IDL file about the api yourself or create it manually.
Regarding the IDL file under the http folder, you can see its function in the biz folder.
Thks for explaining. An error found in Makefile
in cmp/api/
, to use hz
command to generate all services in idls, we need to specify "-force". So better add option -force
in generate
block.
Makefile is now updated https://github.com/CyanAsterisk/FreeCar/pull/159 @YannLee1208
In server/cmd/api/Makefile, to initialize (auto generate hertz code), we need
hz new -idl ./../../idl/api.proto -mod github.com/CyanAsterisk/FreeCar/server/cmd/api
. But fail to findapi.proto
in such path