Skip to content

Commit

Permalink
Add problems value to dotnet package search JSON output (#13133)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nigusu-Allehu authored Jan 9, 2024
1 parent c7e2721 commit 57f0b64
Showing 1 changed file with 54 additions and 17 deletions.
71 changes: 54 additions & 17 deletions accepted/2023/Add-dotnet-search.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,24 +80,61 @@ This option will allow the specification of the output format. The option will t
- Owners
- TotalDownloads

The output will take the following format

[
{
"source": "source Name1",
"packages": [
{
"Owners": "",
"totalDownloads": "",
"latestVersion": "",
"id": ""
}
]
},
{
"source": "source Name2",...
}
The output will take the following format.

{
"version": 1,
"problems": [
{
"level": "error",
"text": "An error occurred!"
}
],
"searchResult": [
{
"source": "source Name1",
"problems": [
{
"level": "error",
"text": "An error occurred!"
}
],
"packages": [
{
"Owners": "",
"totalDownloads": "",
"latestVersion": "",
"id": ""
}
]
},
{
"source": "source Name2",
"problems": [
{
"level": "error",
"text": "An error occurred!"
}
],
"packages": [
{
"Owners": "",
"totalDownloads": "",
"latestVersion": "",
"id": ""
}
]
},...
]
}

##### Error Handling

The `problems` section captures and reports issues, and it appears in two contexts: globally for the command and individually for each source. `problems` has two sections: `level` and `text`. Whether a problem is an error or a warning is presented in `level`. And the message describing the problem is presented in `text`.

- **Global Problems**: Here, `problems` detail issues that prevent the command from proceeding. These are critical errors that affect the entire operation.
- **Source-Specific Problems**: Within each source, `problems` identify issues related only to that source. These might include source errors, or other source-specific issues."


#### Option `--verbosity`

Expand Down

0 comments on commit 57f0b64

Please sign in to comment.