Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
barkbay committed Mar 18, 2024
1 parent 5d5a031 commit fef8ca5
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 15 deletions.
4 changes: 2 additions & 2 deletions test/api/v1/guestbook_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ type Embedded struct {
type Embedded1 struct {
Embedded2 `json:",inline"`
E string `json:"e,omitempty"`
EmbeddedX `json:",inline"`
}
type Embedded2 struct {
B string `json:"b,omitempty"`
Expand All @@ -46,8 +47,7 @@ type Embedded3 struct {
D string `json:"d,omitempty"`
}
type Embedded4 struct {
C string `json:"c,omitempty"`
EmbeddedX `json:",inline"`
C string `json:"c,omitempty"`
}
type EmbeddedX struct {
X string `json:"x,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion test/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ processor:
ignoreGroupVersions:
- "GVK"
ignoreTypes:
- "Embedded[0-9]$"
- "Embedded[2-4]$"
ignoreFields:
- "status$"
- "TypeMeta$"
Expand Down
28 changes: 22 additions & 6 deletions test/expected.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,30 @@ Package v1 contains API Schema definitions for the webapp v1 API group
| *`metadata`* __link:https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.25/#objectmeta-v1-meta[$$ObjectMeta$$]__ | Refer to Kubernetes API documentation for fields of `metadata`.
| |
| *`a`* __string__ | | |
| *`b`* __string__ | | |
| *`c`* __string__ | | |
| *`e`* __string__ | | |
| *`x`* __string__ | | |
| *`d`* __string__ | | |
|===


[id="{anchor_prefix}-github-com-elastic-crd-ref-docs-api-v1-embedded1"]
==== Embedded1







.Appears In:
****
- xref:{anchor_prefix}-github-com-elastic-crd-ref-docs-api-v1-embedded[$$Embedded$$]
****

[cols="20a,50a,15a,15a", options="header"]
|===
| Field | Description | Default | Validation
| *`e`* __string__ | | |
| *`x`* __string__ | | |
|===


Expand All @@ -87,9 +106,6 @@ Package v1 contains API Schema definitions for the webapp v1 API group
****
- xref:{anchor_prefix}-github-com-elastic-crd-ref-docs-api-v1-embedded[$$Embedded$$]
- xref:{anchor_prefix}-github-com-elastic-crd-ref-docs-api-v1-embedded1[$$Embedded1$$]
- xref:{anchor_prefix}-github-com-elastic-crd-ref-docs-api-v1-embedded2[$$Embedded2$$]
- xref:{anchor_prefix}-github-com-elastic-crd-ref-docs-api-v1-embedded3[$$Embedded3$$]
- xref:{anchor_prefix}-github-com-elastic-crd-ref-docs-api-v1-embedded4[$$Embedded4$$]
****

[cols="20a,50a,15a,15a", options="header"]
Expand Down
23 changes: 17 additions & 6 deletions test/expected.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,25 @@ Package v1 contains API Schema definitions for the webapp v1 API group
| `kind` _string_ | `Embedded` | | |
| `metadata` _[ObjectMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.25/#objectmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. | | |
| `a` _string_ | | | |
| `b` _string_ | | | |
| `c` _string_ | | | |
| `e` _string_ | | | |
| `x` _string_ | | | |
| `d` _string_ | | | |


#### Embedded1







_Appears in:_
- [Embedded](#embedded)

| Field | Description | Default | Validation |
| --- | --- | --- | --- |
| `e` _string_ | | | |
| `x` _string_ | | | |


#### EmbeddedX
Expand All @@ -72,9 +86,6 @@ Package v1 contains API Schema definitions for the webapp v1 API group
_Appears in:_
- [Embedded](#embedded)
- [Embedded1](#embedded1)
- [Embedded2](#embedded2)
- [Embedded3](#embedded3)
- [Embedded4](#embedded4)

| Field | Description | Default | Validation |
| --- | --- | --- | --- |
Expand Down

0 comments on commit fef8ca5

Please sign in to comment.