Skip to content

Commit

Permalink
fix: md linebreaks
Browse files Browse the repository at this point in the history
Signed-off-by: Amund Tenstad <[email protected]>
  • Loading branch information
tenstad authored and Amund Tenstad committed Aug 17, 2023
1 parent c573a3d commit 6e7a359
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 92 deletions.
2 changes: 1 addition & 1 deletion templates/markdown/type.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ _Appears in:_
{{ end -}}

{{ range $type.Members -}}
| `{{ .Name }}` _{{ markdownRenderType .Type }}_ | {{ template "type_members" . }} | {{ .Default }} | {{ range .Validation -}} {{ . }} <br>{{ end }} |
| `{{ .Name }}` _{{ markdownRenderType .Type }}_ | {{ template "type_members" . }} | {{ .Default }} | {{ range .Validation -}} {{ . }} <br />{{ end }} |
{{ end -}}

{{ end -}}
Expand Down
141 changes: 50 additions & 91 deletions test/expected.md
Original file line number Diff line number Diff line change
@@ -1,153 +1,113 @@
# API Reference

## Packages
- [webapp.test.k8s.elastic.co/v1](#webapptestk8selasticcov1)

- [webapp.test.k8s.elastic.co/v1](#webapptestk8selasticcov1)

## webapp.test.k8s.elastic.co/v1

Package v1 contains API Schema definitions for the webapp v1 API group

### Resource Types

- [Embedded](#embedded)
- [Guestbook](#guestbook)
- [GuestbookList](#guestbooklist)



#### Embedded









| Field | Description | Default | Validation |
| --- | --- | --- | --- |
| `apiVersion` _string_ | `webapp.test.k8s.elastic.co/v1` | | |
| `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_ | | | |
| `x` _string_ | | | |
| `d` _string_ | | | |
| `e` _string_ | | | |

| Field | Description | Default | Validation |
| ------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------- | ------- | ---------- |
| `apiVersion` _string_ | `webapp.test.k8s.elastic.co/v1` | | |
| `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_ | | | |
| `x` _string_ | | | |
| `d` _string_ | | | |
| `e` _string_ | | | |

#### EmbeddedX







_Appears in:_

- [Embedded](#embedded)
- [Embedded1](#embedded1)
- [Embedded2](#embedded2)
- [Embedded3](#embedded3)
- [Embedded4](#embedded4)

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

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

#### Guestbook



Guestbook is the Schema for the guestbooks API.



_Appears in:_
- [GuestbookList](#guestbooklist)

| Field | Description | Default | Validation |
| --- | --- | --- | --- |
| `apiVersion` _string_ | `webapp.test.k8s.elastic.co/v1` | | |
| `kind` _string_ | `Guestbook` | | |
| `metadata` _[ObjectMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.25/#objectmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. | | |
| `spec` _[GuestbookSpec](#guestbookspec)_ | GuestbookSpec defines the desired state of Guestbook. | | |
- [GuestbookList](#guestbooklist)

| Field | Description | Default | Validation |
| ------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------- | ------- | ---------- |
| `apiVersion` _string_ | `webapp.test.k8s.elastic.co/v1` | | |
| `kind` _string_ | `Guestbook` | | |
| `metadata` _[ObjectMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.25/#objectmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. | | |
| `spec` _[GuestbookSpec](#guestbookspec)_ | GuestbookSpec defines the desired state of Guestbook. | | |

#### GuestbookEntry



GuestbookEntry defines an entry in a guest book.



_Appears in:_
- [GuestbookSpec](#guestbookspec)

| Field | Description | Default | Validation |
| --- | --- | --- | --- |
| `name` _string_ | Name of the guest (pipe | should be escaped) | | |
| `time` _[Time](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.25/#time-v1-meta)_ | Time of entry | | |
| `comment` _string_ | Comment by guest | | |
| `rating` _[Rating](#rating)_ | Rating is the rating provided by a guest. | | MaxLength: 1023 <br> |
- [GuestbookSpec](#guestbookspec)

| Field | Description | Default | Validation |
| -------------------------------------------------------------------------------------------------- | ----------------------------------------- | ------------------ | ---------------------- | --- |
| `name` _string_ | Name of the guest (pipe | should be escaped) | | |
| `time` _[Time](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.25/#time-v1-meta)_ | Time of entry | | |
| `comment` _string_ | Comment by guest | | |
| `rating` _[Rating](#rating)_ | Rating is the rating provided by a guest. | | MaxLength: 1023 <br /> |

#### GuestbookHeader

_Underlying type:_ `string`

GuestbookHeaders are strings to include at the top of a page.



_Appears in:_
- [GuestbookSpec](#guestbookspec)


- [GuestbookSpec](#guestbookspec)

#### GuestbookList



GuestbookList contains a list of Guestbook.





| Field | Description | Default | Validation |
| --- | --- | --- | --- |
| `apiVersion` _string_ | `webapp.test.k8s.elastic.co/v1` | | |
| `kind` _string_ | `GuestbookList` | | |
| `metadata` _[ListMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.25/#listmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. | | |
| `items` _[Guestbook](#guestbook) array_ | Guestbook is the Schema for the guestbooks API. | | |

| Field | Description | Default | Validation |
| -------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------- | ------- | ---------- |
| `apiVersion` _string_ | `webapp.test.k8s.elastic.co/v1` | | |
| `kind` _string_ | `GuestbookList` | | |
| `metadata` _[ListMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.25/#listmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. | | |
| `items` _[Guestbook](#guestbook) array_ | Guestbook is the Schema for the guestbooks API. | | |

#### GuestbookSpec



GuestbookSpec defines the desired state of Guestbook.



_Appears in:_
- [Guestbook](#guestbook)

| Field | Description | Default | Validation |
| --- | --- | --- | --- |
| `page` _[PositiveInt](#positiveint)_ | Page indicates the page number | 1 | Min: 1 <br> |
| `entries` _[GuestbookEntry](#guestbookentry) array_ | Entries contain guest book entries for the page | | |
| `selector` _[LabelSelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.25/#labelselector-v1-meta)_ | Selector selects something | | |
| `headers` _[GuestbookHeader](#guestbookheader) array_ | Headers contains a list of header items to include in the page | | |
| `certificateRef` _[SecretObjectReference](https://gateway-api.sigs.k8s.io/references/spec/#gateway.networking.k8s.io/v1beta1.SecretObjectReference)_ | CertificateRef is a reference to a secret containing a certificate | | |


- [Guestbook](#guestbook)

| Field | Description | Default | Validation |
| ---------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ | ------- | ------------- |
| `page` _[PositiveInt](#positiveint)_ | Page indicates the page number | 1 | Min: 1 <br /> |
| `entries` _[GuestbookEntry](#guestbookentry) array_ | Entries contain guest book entries for the page | | |
| `selector` _[LabelSelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.25/#labelselector-v1-meta)_ | Selector selects something | | |
| `headers` _[GuestbookHeader](#guestbookheader) array_ | Headers contains a list of header items to include in the page | | |
| `certificateRef` _[SecretObjectReference](https://gateway-api.sigs.k8s.io/references/spec/#gateway.networking.k8s.io/v1beta1.SecretObjectReference)_ | CertificateRef is a reference to a secret containing a certificate | | |

#### PositiveInt

Expand All @@ -158,12 +118,12 @@ PositiveInt is a positie integer
_Default_: 1

_Validation:_

- Min: 1

_Appears in:_
- [GuestbookSpec](#guestbookspec)


- [GuestbookSpec](#guestbookspec)

#### Rating

Expand All @@ -172,10 +132,9 @@ _Underlying type:_ `string`
Rating is the rating provided by a guest.

_Validation:_

- MaxLength: 1023

_Appears in:_
- [GuestbookEntry](#guestbookentry)



- [GuestbookEntry](#guestbookentry)

0 comments on commit 6e7a359

Please sign in to comment.