api: Misc fixes after cleanup.

This commit is contained in:
Orne Brocaar 2024-04-01 14:14:32 +01:00
parent 984a113bf0
commit fe82fb3673
4 changed files with 6 additions and 3 deletions

View File

@ -24,7 +24,7 @@
<Protobuf Include="../proto/stream/frame.proto" ProtoRoot="../proto/" OutputDir="Chirpstack/" CompileOutputs="false" AdditionalImportDirs="/googleproto" />
<Protobuf Include="../proto/stream/api_request.proto" ProtoRoot="../proto/" OutputDir="Chirpstack/" CompileOutputs="false" AdditionalImportDirs="/googleproto" />
<Protobuf Include="../proto/stream/backend_interfaces.proto" ProtoRoot="../proto/" OutputDir="Chirpstack/" CompileOutputs="false" AdditionalImportDirs="/googleproto" />
<Protobuf Include="/googleproto/google/api/*.proto" ProtoRoot="/googleproto" OutputDir="Chirpstack/" CompileOutputs="false" />
<Protobuf Include="../proto/google/api/*.proto" ProtoRoot="../proto/" OutputDir="Chirpstack/" CompileOutputs="false" />
</ItemGroup>
<ItemGroup>

3
api/md/Makefile vendored
View File

@ -3,10 +3,11 @@
all: requirements api
requirements:
mkdir -p api
go install github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc@v1.5.1
api:
protoc -I=/googleapis -I=../proto --doc_out=./api --doc_opt=markdown,api.md \
protoc -I=../proto --doc_out=./api --doc_opt=markdown,api.md \
api/application.proto \
api/device.proto \
api/device_profile.proto \

View File

@ -1,3 +1,4 @@
/proto
/src/*.egg-info/
/src/build/
/src/dist/

3
api/python/Makefile vendored
View File

@ -1,7 +1,7 @@
.PHONY: requirements common gw api integration stream
PROTOC := python -m grpc_tools.protoc
PROTOC_ARGS := -I=/googleapis -I=proto --python_out=src --grpc_python_out=src --pyi_out=src
PROTOC_ARGS := -I=proto --python_out=src --grpc_python_out=src --pyi_out=src
PACKAGE_NAME := import \"chirpstack-api/
all: requirements pre-build common gw api integration stream
@ -14,6 +14,7 @@ pre-build:
rm -rf proto
mkdir -p proto/chirpstack-api
cp -r ../proto/* proto/chirpstack-api/
mv proto/chirpstack-api/google proto/google
sed -i 's@^import "common/@$(PACKAGE_NAME)common/@g' `find proto/chirpstack-api -type f -name "*.proto*"`
sed -i 's@^import "gw/@$(PACKAGE_NAME)gw/@g' `find proto/chirpstack-api -type f -name "*.proto*"`
sed -i 's@^import "api/@$(PACKAGE_NAME)api/@g' `find proto/chirpstack-api -type f -name "*.proto*"`