Skip to content

Commit 1294aac

Browse files
Jonathan S. Katzjkatz
authored andcommitted
Allow for generation of API documentation
This generates the API documentation, which in turn will allow users to reference the API from web docs.
1 parent 6b7d4ac commit 1294aac

File tree

4 files changed

+3435
-1
lines changed

4 files changed

+3435
-1
lines changed

Makefile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ release: linuxpgo macpgo winpgo
255255
cp -r $(PGOROOT)/conf $(RELTMPDIR)
256256
tar czvf $(RELFILE) -C $(RELTMPDIR) .
257257

258-
generate: generate-crd generate-deepcopy generate-rbac
258+
generate: generate-crd generate-crd-docs generate-deepcopy generate-rbac
259259
GOBIN='$(CURDIR)/hack/tools' ./hack/update-codegen.sh
260260

261261
generate-crd:
@@ -264,6 +264,13 @@ generate-crd:
264264
paths='./pkg/apis/postgres-operator.crunchydata.com/...' \
265265
output:dir='config/crd/bases' # config/crd/bases/{group}_{plural}.yaml
266266

267+
generate-crd-docs:
268+
GOBIN='$(CURDIR)/hack/tools' go install github.com/mesh-for-data/crdoc@latest
269+
$(CURDIR)/hack/tools/crdoc \
270+
--resources $(CURDIR)/config/crd/bases \
271+
--output $(CURDIR)/docs/content/references/crd.md \
272+
--template $(CURDIR)/hack/api-template.tmpl
273+
267274
generate-deepcopy:
268275
GOBIN='$(CURDIR)/hack/tools' ./hack/controller-generator.sh \
269276
object:headerFile='hack/boilerplate.go.txt' \

docs/content/references/_index.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
title: "References"
3+
date:
4+
draft: false
5+
weight: 100
6+
---

0 commit comments

Comments
 (0)