Repository navigation
Print canonical docs shortlinks in --help, api show, and plugin errors - #2098
Open
waldekmastykarz wants to merge 1 commit into
Open
waldekmastykarz wants to merge 1 commit into
waldekmastykarz wants to merge 1 commit into
Conversation
Adds stable https://go.devproxy.net?go=<code> links to CLI output so agents and users can find the right documentation page without guessing Learn URLs: - Every command's --help ends with a Docs: line (cli, cli-<command>, or <pluginname> for commands contributed by built-in plugins) - devproxy api show includes the Proxy API docs link in text and JSON output - Plugin load, initialization, and configuration validation errors include the plugin's docs link for plugins shipped with Dev Proxy Closes dotnet#2063 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the documentation-shortlink changes.
No open issues 🎉
What changed in this PR
Adds canonical documentation shortlinks to Dev Proxy’s CLI output, helping users and agents find relevant documentation without constructing Learn URLs.
Changes:
- Adds command-specific docs links to help output, including built-in plugin commands while excluding third-party plugins.
- Includes documentation links in
api showtext and JSON output and selected built-in plugin error messages. - Centralizes shortlink generation and adds tests for command-link resolution.
| File | Description |
|---|---|
DevProxy/Plugins/PluginServiceExtensions.cs |
Adds docs links to built-in plugin load, initialization, and missing-URL errors. |
DevProxy/Commands/HelpDocs.cs |
Resolves command-specific links and explicit plugin overrides. |
DevProxy/Commands/DevProxyHelpAction.cs |
Appends documentation links to help output. |
DevProxy/Commands/DevProxyCommand.cs |
Associates plugin commands with their documentation links. |
DevProxy/Commands/ApiCommand.cs |
Adds API documentation links to text and JSON output. |
DevProxy.Tests/HelpDocsTests.cs |
Tests command-link resolution and third-party exclusion. |
DevProxy.Abstractions/Utils/DocsLinks.cs |
Centralizes shortlink generation and built-in plugin identification. |
DevProxy.Abstractions/Plugins/BasePlugin.cs |
Adds built-in plugin docs links to configuration validation errors. |
Review effort: Balanced
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds stable
https://go.devproxy.net?go=<code>docs shortlinks to CLI output so agents and users can find the right docs page without guessing Learn URLs.Changes
--helpfor every command ends with aDocs:line:api,cert) →clicli-<command path>(e.g.cli-api-show,cli-config-get)<pluginname>(e.g.mocks→mockresponseplugin)devproxy api show: addsDocs: https://go.devproxy.net?go=api(text) and adocsproperty (JSON).DevProxy.Plugins. Third-party plugins keep the original message.DocsLinkshelper inDevProxy.Abstractions/Utilsso the CLI never hard-codes Learn paths, plusHelpDocsto resolve per-command links.Notes
I probed every code the CLI can emit. All resolve except these, which need redirects added on the shortlink service:
cli-msgraphdb,cli-cert-remove,websocketmockresponseplugin.Resolves #2063