Repository navigation
UrlDiscoveryPlugin: emit strict JSON from JsonReporter - #2086
Open
waldekmastykarz wants to merge 1 commit into
Open
waldekmastykarz wants to merge 1 commit into
waldekmastykarz wants to merge 1 commit into
Conversation
JsonReporter now writes UrlDiscoveryPlugin_JsonReporter.json containing
{ "urlsToWatch": [...] } instead of a commented .jsonc file, so it can be
consumed with JSON.parse/jq. The wildcard/exclusion guidance remains in
the Markdown and plain-text reports.
Closes dotnet#2076
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 remain for the URL discovery reporting changes.
No open issues 🎉
What changed in this PR
Updates URL discovery reports to produce strict JSON that tools such as JSON.parse and jq can consume directly, while retaining wildcard and exclusion guidance in Markdown and plain-text reports.
Changes:
- Returns a serializable
urlsToWatchobject and changes the JSON report extension from.jsoncto.json. - Adds strict-JSON coverage and preserves the per-report extension regression test using a custom report.
| File | Description |
|---|---|
| DevProxy.Plugins/Reporting/UrlDiscoveryPluginReport.cs | Replaces hand-built JSON with a serializable object and uses .json. |
| DevProxy.Integration.Tests/JsonReporterTests.cs | Verifies strict JSON output, URL values, and independent report extensions. |
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.
Resolves #2076
Changes
UrlDiscoveryPluginReportnow uses the.jsonextension andToJson()returns{ "urlsToWatch": [...] }(serialized byJsonReporter) instead of a hand-built string with//tutorial comments. The output can be consumed directly withJSON.parse/jqand matches every other plugin's JSON report.JsonReporterTestsgets a test asserting the UrlDiscovery report is strict JSON with.jsonextension; the per-report extension regression test (JsonReporter writes.jsoncfor reports after a UrlDiscovery report #1965) now uses a test report with a custom extension.Breaking-ish: the JsonReporter output file is renamed from
UrlDiscoveryPlugin_JsonReporter.jsonctoUrlDiscoveryPlugin_JsonReporter.jsonand no longer contains comments. The object shape (urlsToWatcharray) is unchanged, so it's still paste-ready into a config.