File tree 11 files changed +8854
-2
lines changed
11 files changed +8854
-2
lines changed Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change
1
+ {
2
+ "hideMemberFields" : [
3
+ " TypeMeta"
4
+ ],
5
+ "hideTypePatterns" : [
6
+ " ParseError$" ,
7
+ " List$"
8
+ ],
9
+ "externalPackages" : [
10
+ {
11
+ "typeMatchPrefix" : " ^k8s\\ .io/apimachinery/pkg/apis/meta/v1\\ .Duration$" ,
12
+ "docsURLTemplate" : " https://godoc.org/k8s.io/apimachinery/pkg/apis/meta/v1#Duration"
13
+ },
14
+ {
15
+ "typeMatchPrefix" : " ^k8s\\ .io/(api|apimachinery/pkg/apis)/" ,
16
+ "docsURLTemplate" : " https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.21/#{{lower .TypeIdentifier}}-{{arrIndex .PackageSegments -1}}-{{arrIndex .PackageSegments -2}}"
17
+ },
18
+ {
19
+ "typeMatchPrefix" : " ^knative\\ .dev/pkg/apis/duck" ,
20
+ "docsURLTemplate" : " https://pkg.go.dev/knative.dev/pkg/apis/duck/{{arrIndex .PackageSegments -1}}#{{.TypeIdentifier}}"
21
+ },
22
+ {
23
+ "typeMatchPrefix" : " ^knative\\ .dev/pkg/apis\\ .URL$" ,
24
+ "docsURLTemplate" : " https://pkg.go.dev/knative.dev/pkg/apis#URL"
25
+ },
26
+ {
27
+ "typeMatchPrefix" : " ^knative\\ .dev/networking/pkg/apis/networking" ,
28
+ "docsURLTemplate" : " https://pkg.go.dev/knative.dev/networking/pkg/apis/networking#{{.TypeIdentifier}}"
29
+ },
30
+ {
31
+ "typeMatchPrefix" : " ^time\\ .Duration$" ,
32
+ "docsURLTemplate" : " https://golang.org/pkg/time/#Duration"
33
+ }
34
+ ],
35
+ "typeDisplayNamePrefixOverrides" : {
36
+ "k8s.io/api/" : " Kubernetes " ,
37
+ "k8s.io/apimachinery/pkg/apis/" : " Kubernetes "
38
+ },
39
+ "markdownDisabled" : false ,
40
+ "gitCommitDisabled" : true
41
+ }
42
+
Original file line number Diff line number Diff line change
1
+ { { define " members" } }
2
+
3
+ { { range .Members } }
4
+ { { if not (hiddenMember .)} }
5
+ <tr >
6
+ <td >
7
+ <code >{ { fieldName . } }</code ><br />
8
+ <em >
9
+ { { if linkForType .Type } }
10
+ <a href =" { { linkForType .Type} } " >
11
+ { { typeDisplayName .Type } }
12
+ </a >
13
+ { { else } }
14
+ { { typeDisplayName .Type } }
15
+ { { end } }
16
+ </em >
17
+ </td >
18
+ <td >
19
+ { { if fieldEmbedded . } }
20
+ <p >
21
+ (Members of <code >{ { fieldName . } }</code > are embedded into this type.)
22
+ </p >
23
+ { { end} }
24
+
25
+ { { if isOptionalMember .} }
26
+ <em >(Optional)</em >
27
+ { { end } }
28
+
29
+ { { safe (renderComments .CommentLines) } }
30
+
31
+ { { if and (eq (.Type.Name.Name) " ObjectMeta" ) } }
32
+ Refer to the Kubernetes API documentation for the fields of the
33
+ <code >metadata</code > field.
34
+ { { end } }
35
+
36
+ { { if or (eq (fieldName .) " spec" ) } }
37
+ <br />
38
+ <br />
39
+ <table >
40
+ { { template " members" .Type } }
41
+ </table >
42
+ { { end } }
43
+ </td >
44
+ </tr >
45
+ { { end } }
46
+ { { end } }
47
+
48
+ { { end } }
Original file line number Diff line number Diff line change
1
+ { { define " packages" } }
2
+
3
+ { { with .packages} }
4
+ <p >Packages:</p >
5
+ <ul >
6
+ { { range . } }
7
+ <li >
8
+ <a href =" #{ { - packageAnchorID . -} } " >{ { packageDisplayName . } }</a >
9
+ </li >
10
+ { { end } }
11
+ </ul >
12
+ { { end} }
13
+
14
+ { { range .packages } }
15
+ <h2 id =" { { - packageAnchorID . -} } " >
16
+ { {- packageDisplayName . -} }
17
+ </h2 >
18
+
19
+ { { with (index .GoPackages 0 )} }
20
+ { { with .DocComments } }
21
+ <div >
22
+ { { safe (renderComments .) } }
23
+ </div >
24
+ { { end } }
25
+ { { end } }
26
+
27
+ Resource Types:
28
+ <ul >
29
+ { {- range (visibleTypes (sortedTypes .Types)) -} }
30
+ { { if isExportedType . -} }
31
+ <li >
32
+ <a href =" { { linkForType . } } " >{ { typeDisplayName . } }</a >
33
+ </li >
34
+ { {- end } }
35
+ { {- end -} }
36
+ </ul >
37
+
38
+ { { range (visibleTypes (sortedTypes .Types))} }
39
+ { { template " type" . } }
40
+ { { end } }
41
+ <hr />
42
+ { { end } }
43
+
44
+ <p ><em >
45
+ Generated with <code >gen-crd-api-reference-docs</code >
46
+ { { with .gitCommit } } on git commit <code >{ { . } }</code >{ {end} }.
47
+ </em ></p >
48
+
49
+ { { end } }
Original file line number Diff line number Diff line change
1
+ // Placeholder file to make Go vendor this directory properly.
2
+ package template
Original file line number Diff line number Diff line change
1
+ { { define " type" } }
2
+
3
+ <h3 id =" { { anchorIDForType . } } " >
4
+ { {- .Name.Name } }
5
+ { { if eq .Kind " Alias" } }(<code >{ {.Underlying} }</code > alias){ { end -} }
6
+ </h3 >
7
+ { { with (typeReferences .) } }
8
+ <p >
9
+ (<em >Appears on:</em >
10
+ { {- $prev := " " -} }
11
+ { {- range . -} }
12
+ { {- if $prev -} }, { { end -} }
13
+ { {- $prev = . -} }
14
+ <a href =" { { linkForType . } } " >{ { typeDisplayName . } }</a >
15
+ { {- end -} }
16
+ )
17
+ </p >
18
+ { { end } }
19
+
20
+ <div >
21
+ { { safe (renderComments .CommentLines) } }
22
+ </div >
23
+
24
+ { { with (constantsOfType .) } }
25
+ <table >
26
+ <thead >
27
+ <tr >
28
+ <th >Value</th >
29
+ <th >Description</th >
30
+ </tr >
31
+ </thead >
32
+ <tbody >
33
+ { {- range . -} }
34
+ <tr >
35
+ { {- /*
36
+ renderComments implicitly creates a < p> element, so we
37
+ add one to the display name as well to make the contents
38
+ of the two cells align evenly.
39
+ */ -} }
40
+ <td ><p >{ { typeDisplayName . } }</p ></td >
41
+ <td >{ { safe (renderComments .CommentLines) } }</td >
42
+ </tr >
43
+ { {- end -} }
44
+ </tbody >
45
+ </table >
46
+ { { end } }
47
+
48
+ { { if .Members } }
49
+ <table >
50
+ <thead >
51
+ <tr >
52
+ <th >Field</th >
53
+ <th >Description</th >
54
+ </tr >
55
+ </thead >
56
+ <tbody >
57
+ { { if isExportedType . } }
58
+ <tr >
59
+ <td >
60
+ <code >apiVersion</code ><br />
61
+ string</td >
62
+ <td >
63
+ <code >
64
+ { {apiGroup .} }
65
+ </code >
66
+ </td >
67
+ </tr >
68
+ <tr >
69
+ <td >
70
+ <code >kind</code ><br />
71
+ string
72
+ </td >
73
+ <td ><code >{ {.Name.Name} }</code ></td >
74
+ </tr >
75
+ { { end } }
76
+ { { template " members" .} }
77
+ </tbody >
78
+ </table >
79
+ { { end } }
80
+
81
+ { { end } }
Original file line number Diff line number Diff line change @@ -82,3 +82,6 @@ ${REPO_ROOT_DIR}/hack/update-deps.sh
82
82
83
83
# Make sure the OpenAPI specification and Swagger file are up-to-date
84
84
${REPO_ROOT_DIR} /hack/update-openapigen.sh
85
+
86
+ # Make sure the generated API reference docs are up-to-date
87
+ ${REPO_ROOT_DIR} /hack/update-reference-docs.sh
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ # Copyright 2020 The Tekton Authors
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ set -o errexit
18
+ set -o nounset
19
+
20
+ PREFIX=${GOBIN:- ${GOPATH} / bin}
21
+
22
+ (
23
+ # To support running this script from anywhere, we have to first cd into this directory
24
+ # so we can install the tools.
25
+ cd $( dirname " ${0} " )
26
+ # TODO(abayer): Switch to github.com/ahmetb/gen-crd-api-reference-docs when https://github.com/ahmetb/gen-crd-api-reference-docs/pull/43 is merged
27
+ go install github.com/abayer/gen-crd-api-reference-docs
28
+ )
29
+
30
+ echo " Generating API reference docs ..."
31
+ ${PREFIX} /gen-crd-api-reference-docs \
32
+ -config " ./hack/reference-docs-gen-config.json" \
33
+ -api-dir " github.com/tektoncd/pipeline/pkg/apis" \
34
+ -template-dir " ./hack/reference-docs-template" \
35
+ -out-file " ./docs/pipeline-api.md"
Original file line number Diff line number Diff line change
1
+ /*
2
+ Copyright 2019 The Tekton Authors
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ */
16
+
17
+ // Package apis contains API Schema definitions for the various API groups
18
+ package apis
Original file line number Diff line number Diff line change @@ -14,7 +14,8 @@ See the License for the specific language governing permissions and
14
14
limitations under the License.
15
15
*/
16
16
17
- // +k8s:openapi-gen=true
18
-
19
17
// Package pod contains non-versioned pod configuration
18
+ // +k8s:openapi-gen=true
19
+ // +gencrdrefdocs:unversionedTypes
20
+ // +groupName=tekton.dev
20
21
package pod
Original file line number Diff line number Diff line change
1
+ /*
2
+ Copyright 2019 The Tekton Authors
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ */
16
+
17
+ // Package v1alpha1 contains API Schema definitions for the run v1alpha1 API group
18
+ // +k8s:openapi-gen=true
19
+ // +k8s:deepcopy-gen=package,register
20
+ // +k8s:conversion-gen=github.com/tektoncd/pipeline/pkg/apis/run
21
+ // +k8s:defaulter-gen=TypeMeta
22
+ // +groupName=tekton.dev
23
+ package v1alpha1
You can’t perform that action at this time.
0 commit comments