Skip to content

Commit

Permalink
Add openapi spec
Browse files Browse the repository at this point in the history
  • Loading branch information
cavokz committed Apr 21, 2023
1 parent 0449a18 commit ab642cd
Show file tree
Hide file tree
Showing 5 changed files with 435 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ jobs:
- name: Lint code
run: make lint

- name: Check docs
run: make docs

- name: Run unit tests
env:
TEST_SCHEMA_URI: "./etc/ecs-8.2.0.tar.gz"
Expand Down
2 changes: 2 additions & 0 deletions .license_ignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ requirements.txt
runtime.txt
setup.cfg

docs/api-spec.html

scripts/generate-alerts.sh
scripts/generate-network-events.sh

Expand Down
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ else
embed-python := $(error Embedding Python is not supported on this system)
endif

REDOCLY := npx -y @redocly/cli

rwildcard=$(foreach d,$(wildcard $(1:=/*)),$(call rwildcard,$d,$2) $(filter $(subst *,%,$2),$d))

all: lint tests
Expand All @@ -35,6 +37,7 @@ prereq-go: prereq-py
lint:
$(PYTHON) -m black -q --check geneve tests || ($(PYTHON) -m black geneve tests; false)
$(PYTHON) -m isort -q --check geneve tests || ($(PYTHON) -m isort geneve tests; false)
$(REDOCLY) lint docs/api-spec.yaml

license-check:
bash scripts/license_check.sh
Expand Down Expand Up @@ -95,6 +98,11 @@ package: pkg-build
$(MAKE) pkg-install VENV=$(VENV)
rm -rf $(VENV)

docs/api-spec.html: docs/api-spec.yaml
$(REDOCLY) build-docs --output $@ $<

docs: docs/api-spec.html

CREDS_FILE=credentials-cloud-stack.json

cloud-stack-up:
Expand Down Expand Up @@ -138,4 +146,4 @@ override TEST_STACK_VERSION := $(shell \
)
endif

.PHONY: lint tests online_tests run up down
.PHONY: docs lint tests online_tests run up down
Loading

0 comments on commit ab642cd

Please sign in to comment.