feat: improve parsing by tenstad · Pull Request #51 · elastic/crd-ref-docs · GitHub
Skip to content

feat: improve parsing#51

Merged
thbkrkr merged 6 commits into
elastic:masterfrom
tenstad:cleanup-parsing
Oct 6, 2023
Merged

feat: improve parsing#51
thbkrkr merged 6 commits into
elastic:masterfrom
tenstad:cleanup-parsing

Conversation

@tenstad

@tenstad tenstad commented Aug 9, 2023

Copy link
Copy Markdown
Contributor

Simplifies a lot of the complexity of having separate processType, loadType and loadAliasType.

Removes ArrayKind, as it is not supported by controller-gen.

Also ensures correct parsing of A in the example below, making A.UnderlyingType equal B instead of string. This will be required to correctly parse and propagate markers (#49).

type Foo struct {
	A A `json:"a,omitempty"`
}

type A B
type B string

tenstad added 2 commits August 9, 2023 16:38
Signed-off-by: Amund Tenstad <github@amund.io>
@thbkrkr

thbkrkr commented Oct 5, 2023

Copy link
Copy Markdown
Contributor

@cla-checker-service

This comment was marked as resolved.

@thbkrkr

This comment was marked as resolved.

@tenstad

tenstad commented Oct 6, 2023

Copy link
Copy Markdown
Contributor Author

Added the test in two commits, where the 2nd (319af4e) shows the changes introduced by this PR.

@tenstad

tenstad commented Oct 6, 2023

Copy link
Copy Markdown
Contributor Author

Wondering if we should update the rendering so that the test types we added renders as they used to 🤔

@tenstad

tenstad commented Oct 6, 2023

Copy link
Copy Markdown
Contributor Author

Having different descriptions, I guess it is nice to show both Underlying1 and Underlying2 :)

@thbkrkr

thbkrkr commented Oct 6, 2023

Copy link
Copy Markdown
Contributor

Last changes are 👍 👍 .

I think that the last bits to fix are for the rendering.

In asciidoc, it looks like xref doesn't work well when used in a title. See the example below where the cross reference for Underlying2 doesn't work:

Capture d’écran 2023-10-06 à 10 24 51

The only idea I have for now is to use link:#, which seems a bit hacky?

For markdown, we need to add the backquotes conditionally otherwise the link is not rendered:

Capture d’écran 2023-10-06 à 11 57 31

@tenstad

tenstad commented Oct 6, 2023

Copy link
Copy Markdown
Contributor Author

@thbkrkr thbkrkr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

We really appreciate your contribution, thanks again.

@thbkrkr thbkrkr merged commit 365ecbe into elastic:master Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants