diff --git a/.changelog/1217.doc.md b/.changelog/1217.doc.md new file mode 100644 index 000000000..4e79d0f9a --- /dev/null +++ b/.changelog/1217.doc.md @@ -0,0 +1 @@ +Generate docs using @scalar/api-reference instead of redoc-cli diff --git a/.gitignore b/.gitignore index 7b89f9191..dc397fa81 100644 --- a/.gitignore +++ b/.gitignore @@ -20,8 +20,6 @@ tests/e2e_regression/**/rpc-cache/ /logs # API files. -index.html -api/spec/v1.html api/spec/v1.json # Coverage reports. diff --git a/Makefile b/Makefile index e9925b719..a4d6fa0ec 100644 --- a/Makefile +++ b/Makefile @@ -141,13 +141,9 @@ lint-go-mod-tidy: lint: $(lint-targets) -# Documentation -docs-targets := docs-api - +# Documentation preview docs-api: - @npx redoc-cli build api/spec/v1.yaml -o api/spec/v1.html - -docs: $(docs-targets) + @npx serve ./api/spec/ start-docker: @docker compose up --remove-orphans @@ -241,5 +237,4 @@ release-build: codegen-go fetch-git \ release-tag \ $(lint-targets) lint \ - $(docs-targets) docs \ run diff --git a/api/spec/v1.html b/api/spec/v1.html new file mode 100644 index 000000000..d01a966a1 --- /dev/null +++ b/api/spec/v1.html @@ -0,0 +1,68 @@ + + +
+ + + + + + + + + + + + diff --git a/docker/nexus/Dockerfile b/docker/nexus/Dockerfile index 852bc4460..5eb5799b0 100644 --- a/docker/nexus/Dockerfile +++ b/docker/nexus/Dockerfile @@ -12,14 +12,6 @@ RUN \ ############ -FROM node:18-slim AS openapi-builder - -COPY api/spec /api/spec -WORKDIR / -RUN npx redoc-cli build api/spec/v1.yaml -o api/spec/v1.html - -############ - FROM golang:1.25-trixie AS nexus WORKDIR /nexus @@ -29,6 +21,5 @@ RUN apt-get update -q -q && \ COPY --from=nexus-builder /code/go/nexus /usr/local/bin/nexus COPY --from=nexus-builder /code/go/ /nexus -COPY --from=openapi-builder /api/spec/v1.html api/spec/v1.html ENTRYPOINT ["nexus"]