From 5b28031d425414cc4808ea172abe961a924f0424 Mon Sep 17 00:00:00 2001 From: Francesco Canovai Date: Thu, 27 Mar 2025 09:24:07 +0100 Subject: [PATCH] ci: review apidoc task Signed-off-by: Francesco Canovai --- Taskfile.yml | 5 +++-- docs/config.yaml | 22 ---------------------- 2 files changed, 3 insertions(+), 24 deletions(-) diff --git a/Taskfile.yml b/Taskfile.yml index b2d979e..913bdc9 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -73,14 +73,15 @@ tasks: desc: Update the API Reference section of the documentation env: # renovate: datasource=git-refs depName=genref lookupName=https://github.com/cloudnative-pg/daggerverse currentValue=main - DAGGER_UNCOMMITTED_SHA: ac27cc7677fc42ea129fd3c1aa2b2894aad3a246 + DAGGER_APIDOC_SHA: ac27cc7677fc42ea129fd3c1aa2b2894aad3a246 cmds: - - GITHUB_REF= dagger -s call -m github.com/cloudnative-pg/daggerverse/genref@${DAGGER_UNCOMMITTED_SHA} genref --source . + - GITHUB_REF= dagger -s call -m github.com/cloudnative-pg/daggerverse/genref@${DAGGER_APIDOC_SHA} genref --source . --args "-c=config.yaml" --args "-o=src" --args "-include=plugin-barman-cloud" file --path src/plugin-barman-cloud.v1.md export --path docs/src/plugin-barman-cloud.v1.md sources: - ./api/**/*.go + - ./docs/config.yaml generates: - ./docs/src/plugin-barman-cloud.v1.md diff --git a/docs/config.yaml b/docs/config.yaml index ee0c1a9..4195d1a 100644 --- a/docs/config.yaml +++ b/docs/config.yaml @@ -2,30 +2,8 @@ hiddenMemberFields: - "TypeMeta" externalPackages: - - match: ^github\.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1\.RelabelConfig$ - target: https://pkg.go.dev/github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1#RelabelConfig - - match: ^k8s\.io/apimachinery/pkg/apis/meta/v1\.Duration$ - target: https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration - - match: ^k8s\.io/apimachinery/pkg/apis/meta/v1\.GroupVersionKind$ - target: https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#GroupVersionKind - - match: ^k8s\.io/apimachinery/pkg/apis/meta/v1\.GroupVersionResource$ - target: https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#GroupVersionResource - - match: ^k8s\.io/apimachinery/pkg/types\.UID$ - target: https://pkg.go.dev/k8s.io/apimachinery/pkg/types#UID - - match: ^k8s\.io/apimachinery/pkg/runtime\.RawExtension$ - target: https://pkg.go.dev/k8s.io/apimachinery/pkg/runtime/#RawExtension - - match: ^k8s\.io/apimachinery/pkg/api/resource\.Quantity$ - target: https://pkg.go.dev/k8s.io/apimachinery/pkg/api/resource#Quantity - - match: ^k8s\.io/apimachinery/pkg/api/resource\.QuantityValue$ - target: https://pkg.go.dev/k8s.io/apimachinery/pkg/api/resource#QuantityValue - - match: ^k8s\.io/apimachinery/pkg/runtime\.Unknown$ - target: https://pkg.go.dev/k8s.io/apimachinery/pkg/runtime#Unknown - - match: ^time\.Duration$ - target: https://pkg.go.dev/time#Duration - match: ^k8s\.io/(api|apimachinery/pkg/apis)/ target: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#{{- lower .TypeIdentifier -}}-{{- arrIndex .PackageSegments -1 -}}-{{- arrIndex .PackageSegments -2 -}} - - match: ^github\.com/cloudnative-pg/machinery - target: https://pkg.go.dev/github.com/cloudnative-pg/machinery/pkg/api/#{{- .TypeIdentifier }} - match: ^github\.com/cloudnative-pg/barman-cloud target: https://pkg.go.dev/github.com/cloudnative-pg/barman-cloud/pkg/api/#{{- .TypeIdentifier }}