Skip to content

Commit

Permalink
feat: API-first approach for REST interface (#1129)
Browse files Browse the repository at this point in the history
* feat: embed OpenAPI definition file

* feat: use OpenAPI generated server and client

* feat: provide OpenAPI interface documentation

* chore(test): add additional tests
  • Loading branch information
0xERR0R committed Sep 9, 2023
1 parent 245bb61 commit 72d747c
Show file tree
Hide file tree
Showing 41 changed files with 6,185 additions and 9,313 deletions.
1 change: 0 additions & 1 deletion .dockerignore
@@ -1,7 +1,6 @@
bin
dist
site
docs
node_modules
.git
.idea
Expand Down
2 changes: 0 additions & 2 deletions .gitignore
Expand Up @@ -5,8 +5,6 @@
/*.pem
bin/
dist/
docs/swagger.json
docs/swagger.yaml
docs/docs.go
site/
config.yml
Expand Down
8 changes: 1 addition & 7 deletions Makefile
@@ -1,4 +1,4 @@
.PHONY: all clean generate build swagger test e2e-test lint run fmt docker-build help
.PHONY: all clean generate build test e2e-test lint run fmt docker-build help
.DEFAULT_GOAL:=help

VERSION?=$(shell git describe --always --tags)
Expand Down Expand Up @@ -31,12 +31,6 @@ all: build test lint ## Build binary (with tests)
clean: ## cleans output directory
rm -rf $(BIN_OUT_DIR)/*

swagger: ## creates swagger documentation as html file
npm install bootprint bootprint-openapi html-inline
go run github.com/swaggo/swag/cmd/swag init -g api/api.go
$(shell) node_modules/bootprint/bin/bootprint.js openapi docs/swagger.json /tmp/swagger/
$(shell) node_modules/html-inline/bin/cmd.js /tmp/swagger/index.html > docs/swagger.html

serve_docs: ## serves online docs
pip install mkdocs-material
mkdocs serve
Expand Down
63 changes: 0 additions & 63 deletions api/api.go

This file was deleted.

0 comments on commit 72d747c

Please sign in to comment.