Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: descriptions #156

Merged
merged 5 commits into from
Apr 26, 2024
Merged

fix: descriptions #156

merged 5 commits into from
Apr 26, 2024

Conversation

kai687
Copy link
Contributor

@kai687 kai687 commented Apr 25, 2024

Extract the first sentence of the parameter description and uses it as help text.

I wrote the specs such that the first sentence is followed by an empty line, followed by more information. For the CLI, we can extract the first sentence and use it as help text.

I replace any Markdown links [link text](https://some/url) with link text,
so that it reads nicely in the terminal.

What do you think @clemfromspace ?

pkg/gen/gen_flags.go Outdated Show resolved Hide resolved
pkg/gen/gen_flags.go Outdated Show resolved Hide resolved
@clemfromspace
Copy link
Collaborator

clemfromspace commented Apr 25, 2024

Looks good, thanks @kai687!
I do not see any links in the generated flags anymore though, is that intended?

@kai687
Copy link
Contributor Author

kai687 commented Apr 25, 2024

Good question! The links depend on the pages in the docs being there.
Currently there are no pages for semanticSearch, reRankingApplyFilter, or cursor,
so these links don't work.

I thought it would be too much of a dependency. Like, the flags themselves are coming from the specs and the links depend on the old docs. If we ever want to change that, we need to update the CLI as well.

For now, I could add back links to pages that exist. WDYT?

@clemfromspace
Copy link
Collaborator

@kai687 That sounds good 👍

Copy link
Collaborator

@clemfromspace clemfromspace left a comment

Choose a reason for hiding this comment

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

LGTM ✅

@kai687
Copy link
Contributor Author

kai687 commented Apr 26, 2024

Thanks! Can't merge myself.

@clemfromspace clemfromspace merged commit e1cff9f into algolia:main Apr 26, 2024
2 checks passed
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.

None yet

2 participants