From 92f7d7bcb840156c44ed8224288b404702ab9967 Mon Sep 17 00:00:00 2001 From: Mr-Leshiy Date: Tue, 12 Dec 2023 16:03:39 +0200 Subject: [PATCH] generate openapi docs --- catalyst-gateway/Earthfile | 3 +++ docs/src/api/cat-gateway/openapi.md | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/catalyst-gateway/Earthfile b/catalyst-gateway/Earthfile index f41c71776dd..0b61c312c62 100644 --- a/catalyst-gateway/Earthfile +++ b/catalyst-gateway/Earthfile @@ -31,6 +31,9 @@ build-hosted: DO github.com/input-output-hk/catalyst-ci/earthly/rust:v2.0.11+SMOKE_TEST --bin="cat-gateway" + # generate OpenAPI docs + RUN ./target/$TARGETARCH/release/cat-gateway docs ./target/$TARGETARCH/doc/cat-gateway-api.json + SAVE ARTIFACT target/$TARGETARCH/doc doc SAVE ARTIFACT target/$TARGETARCH/release/cat-gateway cat-gateway diff --git a/docs/src/api/cat-gateway/openapi.md b/docs/src/api/cat-gateway/openapi.md index eb2a60ff1f9..089d0506a29 100644 --- a/docs/src/api/cat-gateway/openapi.md +++ b/docs/src/api/cat-gateway/openapi.md @@ -4,8 +4,8 @@ icon: material/server # OpenAPI docs +[OPEN FILE](./rust-docs/cat-gateway-api.json) + ```JSON -{ - "name": "Alex", -} + {{ include_file('src/api/cat-gateway/rust-docs/cat-gateway-api.json') }} ``` \ No newline at end of file