mirror of
https://github.com/luxfi/openapi.git
synced 2026-10-30 15:23:31 +00:00
The three health operations are mounted beneath the app's ops base, so the spec names the addresses a client actually reaches. Shipped in node v1.36.179.
22 lines
874 B
Makefile
22 lines
874 B
Makefile
.PHONY: openapi-lint openapi-fixtures help
|
|
|
|
help:
|
|
@echo "openapi-lint validate every yaml against the v3.1 contract"
|
|
@echo "openapi-fixtures re-capture fixtures from HOST (default api.lux.network)"
|
|
|
|
openapi-lint:
|
|
@python3 scripts/validate_openapi.py
|
|
|
|
HOST ?= https://api.lux.network
|
|
|
|
openapi-fixtures:
|
|
@curl -sS $(HOST)/v1/info -X POST -H "Content-Type: application/json" \
|
|
-d '{"jsonrpc":"2.0","id":1,"method":"info.getNetworkID"}' \
|
|
| python3 -m json.tool > fixtures/info-getNetworkID-response.json
|
|
@curl -sS $(HOST)/v1/health/ops/liveness \
|
|
| python3 -m json.tool > fixtures/health-liveness-response.json
|
|
@curl -sS $(HOST)/v1/chain/P -X POST -H "Content-Type: application/json" \
|
|
-d '{"jsonrpc":"2.0","id":1,"method":"platform.getHeight"}' \
|
|
| python3 -m json.tool > fixtures/pchain-getHeight-response.json
|
|
@echo "fixtures refreshed against $(HOST)"
|