Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions docs/all-api-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -4882,10 +4882,10 @@ CreateControlPlaneRequest - The request schema for the create control plane requ
| --- | --- |
| `name` _string_ | The name of the control plane. |
| `description` _string_ | The description of the control plane in Konnect. |
| `cluster_type` _[CreateControlPlaneRequestClusterType](#createcontrolplanerequestclustertype)_ | The ClusterType value of the cluster associated with the Control Plane. |
| `auth_type` _[AuthType](#authtype)_ | The auth type value of the cluster associated with the Runtime Group. |
| `cluster_type` _string_ | The ClusterType value of the cluster associated with the Control Plane. |
| `auth_type` _string_ | The auth type value of the cluster associated with the Runtime Group. |
| `cloud_gateway` _boolean_ | Whether this control-plane can be used for cloud-gateways. |
| `proxy_urls` _[ProxyURL](#proxyurl) array_ | Array of proxy URLs associated with reaching the data-planes connected to a control-plane. |
| `proxy_urls` _object array_ | Array of proxy URLs associated with reaching the data-planes connected to a control-plane. |
| `labels` _object (keys:string, values:string)_ | Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.<br /><br />Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_". |


Expand Down Expand Up @@ -5281,10 +5281,10 @@ KonnectGatewayControlPlaneSpec defines the desired state of KonnectGatewayContro
| --- | --- |
| `name` _string_ | The name of the control plane. |
| `description` _string_ | The description of the control plane in Konnect. |
| `cluster_type` _[CreateControlPlaneRequestClusterType](#createcontrolplanerequestclustertype)_ | The ClusterType value of the cluster associated with the Control Plane. |
| `auth_type` _[AuthType](#authtype)_ | The auth type value of the cluster associated with the Runtime Group. |
| `cluster_type` _string_ | The ClusterType value of the cluster associated with the Control Plane. |
| `auth_type` _string_ | The auth type value of the cluster associated with the Runtime Group. |
| `cloud_gateway` _boolean_ | Whether this control-plane can be used for cloud-gateways. |
| `proxy_urls` _[ProxyURL](#proxyurl) array_ | Array of proxy URLs associated with reaching the data-planes connected to a control-plane. |
| `proxy_urls` _object array_ | Array of proxy URLs associated with reaching the data-planes connected to a control-plane. |
| `labels` _object (keys:string, values:string)_ | Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.<br /><br />Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_". |
| `mirror` _[MirrorSpec](#mirrorspec)_ | Mirror is the Konnect Mirror configuration. It is only applicable for ControlPlanes that are created as Mirrors. |
| `source` _[EntitySource](#entitysource)_ | Source represents the source type of the Konnect entity. |
Expand Down Expand Up @@ -5896,7 +5896,7 @@ KonnectGatewayControlPlaneStatus defines the observed state of KonnectGatewayCon
| `id` _string_ | ID is the unique identifier of the Konnect entity as assigned by Konnect API. If it's unset (empty string), it means the Konnect entity hasn't been created yet. |
| `serverURL` _string_ | ServerURL is the URL of the Konnect server in which the entity exists. |
| `organizationID` _string_ | OrgID is ID of Konnect Org that this entity has been created in. |
| `clusterType` _[ControlPlaneClusterType](#controlplaneclustertype)_ | ClusterType is the cluster type of the Konnect control plane. When the KonnectGatewayControlPlane is attached to a control plane in Konnect, ClusterType is filled with the cluster type of the control plane. |
| `clusterType` _string_ | ClusterType is the cluster type of the Konnect control plane. When the KonnectGatewayControlPlane is attached to a control plane in Konnect, ClusterType is filled with the cluster type of the control plane. |
| `konnectEndpoints` _[KonnectEndpoints](#konnectendpoints)_ | Endpoints defines the Konnect endpoints for the control plane. They are required by the DataPlane to be properly configured in Konnect and connect to the control plane. |


Expand Down
14 changes: 7 additions & 7 deletions docs/konnect-api-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -300,10 +300,10 @@ CreateControlPlaneRequest - The request schema for the create control plane requ
| --- | --- |
| `name` _string_ | The name of the control plane. |
| `description` _string_ | The description of the control plane in Konnect. |
| `cluster_type` _[CreateControlPlaneRequestClusterType](#createcontrolplanerequestclustertype)_ | The ClusterType value of the cluster associated with the Control Plane. |
| `auth_type` _[AuthType](#authtype)_ | The auth type value of the cluster associated with the Runtime Group. |
| `cluster_type` _string_ | The ClusterType value of the cluster associated with the Control Plane. |
| `auth_type` _string_ | The auth type value of the cluster associated with the Runtime Group. |
| `cloud_gateway` _boolean_ | Whether this control-plane can be used for cloud-gateways. |
| `proxy_urls` _[ProxyURL](#proxyurl) array_ | Array of proxy URLs associated with reaching the data-planes connected to a control-plane. |
| `proxy_urls` _object array_ | Array of proxy URLs associated with reaching the data-planes connected to a control-plane. |
| `labels` _object (keys:string, values:string)_ | Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.<br /><br />Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_". |


Expand Down Expand Up @@ -699,10 +699,10 @@ KonnectGatewayControlPlaneSpec defines the desired state of KonnectGatewayContro
| --- | --- |
| `name` _string_ | The name of the control plane. |
| `description` _string_ | The description of the control plane in Konnect. |
| `cluster_type` _[CreateControlPlaneRequestClusterType](#createcontrolplanerequestclustertype)_ | The ClusterType value of the cluster associated with the Control Plane. |
| `auth_type` _[AuthType](#authtype)_ | The auth type value of the cluster associated with the Runtime Group. |
| `cluster_type` _string_ | The ClusterType value of the cluster associated with the Control Plane. |
| `auth_type` _string_ | The auth type value of the cluster associated with the Runtime Group. |
| `cloud_gateway` _boolean_ | Whether this control-plane can be used for cloud-gateways. |
| `proxy_urls` _[ProxyURL](#proxyurl) array_ | Array of proxy URLs associated with reaching the data-planes connected to a control-plane. |
| `proxy_urls` _object array_ | Array of proxy URLs associated with reaching the data-planes connected to a control-plane. |
| `labels` _object (keys:string, values:string)_ | Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.<br /><br />Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_". |
| `mirror` _[MirrorSpec](#mirrorspec)_ | Mirror is the Konnect Mirror configuration. It is only applicable for ControlPlanes that are created as Mirrors. |
| `source` _[EntitySource](#entitysource)_ | Source represents the source type of the Konnect entity. |
Expand Down Expand Up @@ -1213,7 +1213,7 @@ KonnectGatewayControlPlaneStatus defines the observed state of KonnectGatewayCon
| `id` _string_ | ID is the unique identifier of the Konnect entity as assigned by Konnect API. If it's unset (empty string), it means the Konnect entity hasn't been created yet. |
| `serverURL` _string_ | ServerURL is the URL of the Konnect server in which the entity exists. |
| `organizationID` _string_ | OrgID is ID of Konnect Org that this entity has been created in. |
| `clusterType` _[ControlPlaneClusterType](#controlplaneclustertype)_ | ClusterType is the cluster type of the Konnect control plane. When the KonnectGatewayControlPlane is attached to a control plane in Konnect, ClusterType is filled with the cluster type of the control plane. |
| `clusterType` _string_ | ClusterType is the cluster type of the Konnect control plane. When the KonnectGatewayControlPlane is attached to a control plane in Konnect, ClusterType is filled with the cluster type of the control plane. |
| `konnectEndpoints` _[KonnectEndpoints](#konnectendpoints)_ | Endpoints defines the Konnect endpoints for the control plane. They are required by the DataPlane to be properly configured in Konnect and connect to the control plane. |


Expand Down
4 changes: 4 additions & 0 deletions scripts/apidocs-gen/generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,7 @@ generate "/api/incubator" "/docs/incubator-api-reference.md"
generate "/api/gateway-operator" "/docs/gateway-operator-api-reference.md"

generate "/api" "/docs/all-api-reference.md"

# Post-process generated docs to map external SDK types to primitives
chmod +x "${SCRIPT_ROOT}/scripts/apidocs-gen/post-process-types.sh"
"${SCRIPT_ROOT}/scripts/apidocs-gen/post-process-types.sh"
38 changes: 38 additions & 0 deletions scripts/apidocs-gen/post-process-types.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/bin/bash

set -o errexit
set -o nounset
set -o pipefail

# This script post-processes generated API reference docs to replace links to
# external SDK types with their primitive equivalents, so the docs do not
# reference missing type definitions.
#
# It operates in-place on the generated markdown files under ./docs/.

SCRIPT_ROOT="$(dirname "${BASH_SOURCE[0]}")/../.."

# Candidate docs to process (some may not exist in all builds)
DOC_FILES=(
"${SCRIPT_ROOT}/docs/konnect-api-reference.md"
"${SCRIPT_ROOT}/docs/all-api-reference.md"
"${SCRIPT_ROOT}/docs/configuration-api-reference.md"
"${SCRIPT_ROOT}/docs/gateway-operator-api-reference.md"
"${SCRIPT_ROOT}/docs/incubator-api-reference.md"
)

for f in "${DOC_FILES[@]}"; do
if [[ -f "${f}" ]]; then
echo "INFO: post-processing ${f}"
# Map external types to primitives for readability and to avoid dead anchors.
# AuthType -> string
sed -i -E 's/_\[AuthType\]\(#authtype\)_/_string_/g' "${f}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How to maintain this list? Is it generated by some other scripts or maintained manually?
If it is maintained manually, I think we need some comments/documents to introduce how to keep them up to date.

# CreateControlPlaneRequestClusterType -> string
sed -i -E 's/_\[CreateControlPlaneRequestClusterType\]\(#createcontrolplanerequestclustertype\)_/_string_/g' "${f}"
# ControlPlaneClusterType -> string
sed -i -E 's/_\[ControlPlaneClusterType\]\(#controlplaneclustertype\)_/_string_/g' "${f}"
# ProxyURL -> object (array forms keep the trailing " array")
sed -i -E 's/_\[ProxyURL\]\(#proxyurl\) array_/_object array_/g' "${f}"
sed -i -E 's/_\[ProxyURL\]\(#proxyurl\)_/_object_/g' "${f}"
fi
done
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
done
done

Loading