Skip to content

Commit

Permalink
Merge "Documentation: Auto-generate API doc"
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuul CI authored and Gerrit Code Review committed Oct 19, 2023
2 parents e452070 + 2e98626 commit 91f75f6
Show file tree
Hide file tree
Showing 9 changed files with 583 additions and 5 deletions.
20 changes: 19 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,23 @@ Before submitting a change or a patch chain for review, please consider the foll

1. Are the commit messages clear and explanatory?
1. Do the changes need to be documented in the changelog?
1. Do the changes cover any required modification of the existing documentation?
1. Do the changes cover any required modification of the existing documentation? (see [guidelines](#documentation-guidelines) below)
1. Are the changes tested? We do not require unit testing but do expect functional testing coverage.

## Documentation guidelines

The documentation is written in Markdown, as implemented by GitHub Pages. Please refer to
[this documentation](https://www.markdownguide.org/tools/github-pages/) to check what elements are supported.

Any change that implements a new feature or significantly changes an existing one must be reflected
in the documentation, in the impacted section(s).

### API Documentation

The API documentation is auto-generated with [crd-ref-docs](https://github.com/elastic/crd-ref-docs).

Running `make` or `make build` or `make build-api-doc` will update the API documentation if needed.

### CLI Documentation

For now the CLI documentation must be updated by hand.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,13 @@ dev-deployment:
##@ Build

.PHONY: build
build: generate fmt vet sc ## Build manager binary.
build: generate fmt vet sc build-api-doc ## Build manager binary.
go build -o bin/manager main.go

.PHONY: build-api-doc
build-api-doc: # Build the API documentation.
./tools/build-api-doc.sh

.PHONY: run
run: manifests generate fmt vet ## Run a controller from your host.
go run ./main.go
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ The current project status is: **Alpha - NOT PRODUCTION READY**
* [Deployment documentation](https://softwarefactory-project.github.io/sf-operator/deployment/): this documentation covers the essentials for people or teams who intend to deploy and manage Zuul and its dependencies through the SF-Operator.
* [Developer documentation](https://softwarefactory-project.github.io/sf-operator/developer/): this documentation describes how to set up a development and testing environment to develop the SF-Operator.
* [End User documentation](https://softwarefactory-project.github.io/sf-operator/user/): for users of a Software Factory instance. This documentation mostly describes the `Software Factory's config repository` usage (configuration-as-code).
* [CLI refererence](https://softwarefactory-project.github.io/sf-operator/cli/)
* [CLI refererence](https://softwarefactory-project.github.io/sf-operator/reference/cli/)

## Getting Help

Expand Down
11 changes: 11 additions & 0 deletions doc/_apidoc/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
processor:
ignoreFields:
- "status$"
- "TypeMeta$"

render:
kubernetesVersion: 1.24
knownTypes:
- name: Quantity
package: k8s.io/apimachinery/pkg/api/resource
link: https://pkg.go.dev/k8s.io/[email protected]/pkg/api/resource#Quantity
4 changes: 2 additions & 2 deletions doc/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

Welcome to SF-Operator's documentation. To know more about the project's purpose,
please consult the [README](./README.md).

## Table of Contents

1. [Operator documentation](./operator/index.md)
1. [Deployment documentation](./deployment/index.md)
1. [Developer documentation](./developer/index.md)
1. [End User documentation](./user/index.md)
1. [CLI reference](./cli/index.md)
1. [Architectural Decision Records](./adr/index.md)
1. [Reference](./reference/index.md)
Loading

0 comments on commit 91f75f6

Please sign in to comment.