Kubernetes CRD API Generator
To generate an HTML API documentation page:
- Obtain some
jsonoryamlmanifest files that contain one or moreCustomResourceDefinitionobjects - Optionally obtain a file with some api info.
- Run:
docker run --rm -v $PWD/<PATH_TO_YOUR_FILES>:/<ANY_PATH> ghcr.io/srfrnk/crd-api-doc-gen:<VERSION_TAG> <INPUT_FOLDER_PATH> <OUTPUT_FOLDER_PATH> [<API_INFO_PATH>] - Note that these paths are internal to the container. E.g.
docker run --rm -v /mybox/myfiles:/internal ghcr.io/srfrnk/crd-api-doc-gen:latest /internal/some/path /internal/another/path <INPUT_FOLDER_PATH>needs to contain anyyamlorjsonK8s manifest files with CRD definitions.- Find generated HTML page
index.htmlinside the specified output folder.
To customize api info you can specify an api-info file.
This file must be in yaml/json format and have the following structure:
api-info:
version: <ANY STRING>
title: <ANY STRING>
description: <ANY MARKDOWN TEXT>- Based on openapi-generator
- Using yq