-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add docs sub-commands #4881
Add docs sub-commands #4881
Conversation
samcli/commands/docs/command.py
Outdated
self.command_string = self.docs_command.sub_command_string | ||
self.command_callback = self.docs_command.command_callback | ||
|
||
def get_command(self, ctx: Context, cmd_name: str) -> Command: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how does --help text look like?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…into docs-sub-commands
…into docs-sub-commands
@@ -0,0 +1,21 @@ | |||
{ | |||
"config": "https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-config.html", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a lot of repetitive URLs here but I left it this way since we have no way of guaranteeing that new URLs will have the same pattern. It also just keeps the configuration easy instead of trying to parse patterns for different types of URLs in our documentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good to me. I just left some minor comments and questions, but I do not think it should block the PR
Which issue(s) does this change fix?
N/A
Why is this change necessary?
Makes the
sam docs
command more useful by providing invokable sub-commands to open more specific pages.For example, the documentation for each command and its sub-commands is now retrievable with:
and even non-commands like
sam docs config
.What side effects does this change have?
N/A
Mandatory Checklist
PRs will only be reviewed after checklist is complete
make pr
passesmake update-reproducible-reqs
if dependencies were changedBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.