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

CommandAvailability is not documented #1053

Closed
The4thLaw opened this issue Apr 22, 2024 · 1 comment
Closed

CommandAvailability is not documented #1053

The4thLaw opened this issue Apr 22, 2024 · 1 comment
Labels
area/documentation Belongs to documentation branch/3.2.x Issue for a branch for/backport For backporting
Milestone

Comments

@The4thLaw
Copy link

The documentation at https://docs.spring.io/spring-shell/reference/commands/availability.html explains how one can achieve dynamic command availability.

However, it seems that the documented annotation is only applicable on @ShellMethod commands, i.e. using the legacy annotations.

The new @Command-based methods should apparently use @CommandAvailability and rely on the AvailabilityProvider functional interface.

Perhaps the documentation should, also in this case, make a distinction between legacy and recommended annotations.

@github-actions github-actions bot added the status/need-triage Team needs to triage and take a first look label Apr 22, 2024
@jvalkeal jvalkeal added area/documentation Belongs to documentation and removed status/need-triage Team needs to triage and take a first look labels Apr 29, 2024
@jvalkeal jvalkeal added this to the 3.3.x milestone Apr 29, 2024
@jvalkeal
Copy link
Contributor

You're right about this. That section indeed feels confusing and not clear.

@jvalkeal jvalkeal modified the milestones: 3.3.x, 3.3.0-RC1 May 23, 2024
@jvalkeal jvalkeal added for/backport For backporting branch/3.2.x Issue for a branch labels May 23, 2024
jvalkeal added a commit that referenced this issue May 23, 2024
- Docs for annotation and registration
- Remove dynamic from header
- Move samples to snippets
- Backport #1053
- Fixes #1073
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/documentation Belongs to documentation branch/3.2.x Issue for a branch for/backport For backporting
Projects
None yet
Development

No branches or pull requests

2 participants