Skip to content

Commit

Permalink
Merge pull request #15 from solarisdb/rest_api_definition
Browse files Browse the repository at this point in the history
The public Rest API definition
  • Loading branch information
kbabushkin committed Mar 29, 2024
2 parents acaf209 + 1c4bc51 commit f0a4ec1
Show file tree
Hide file tree
Showing 7 changed files with 888 additions and 5 deletions.
11 changes: 10 additions & 1 deletion api/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ PROTOC = protoc
SOURCES = $(shell find . -name "*.proto")

.PHONY: all
all: clean compile
all: clean compile solaris.v1

.PHONY: clean
clean:
@rm -rf gen/*
@rm -rf genpublic/v1/*

.PHONY: compile
compile: $(SOURCES:.proto=.go)
Expand All @@ -15,3 +16,11 @@ compile: $(SOURCES:.proto=.go)
@DIR=$(shell dirname $^);RESDIR=gen/;mkdir -p $$RESDIR;\
FNAME=$(shell basename $^);$(PROTOC) -I $$DIR --go-grpc_out=$$RESDIR --go_out=$$RESDIR $$FNAME

.PHONY: oapi-gen
oapi-gen:
@go install github.com/deepmap/oapi-codegen/cmd/oapi-codegen@latest

.PHONY: solaris.v1
solaris.v1:
@echo "generating go stubs for public Solaris REST API v1 ..."
@oapi-codegen --config openapi/v1/solaris_gen_config.yaml openapi/v1/solaris.yaml
Loading

0 comments on commit f0a4ec1

Please sign in to comment.