Repository navigation
examples/skills: fix malformed JSON in the scan-dependencies curl example - #411
Closed
RyoKusnadi wants to merge 1 commit into
Closed
RyoKusnadi wants to merge 1 commit into
RyoKusnadi wants to merge 1 commit into
Conversation
…mple Signed-off-by: Ryo Kusnadi <ryokusnadi@gmail.com>
Author
|
Closing this for now, happy to reopen if it's useful. |
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.
Problem
Step 2 of the
scan-dependenciesexample skill tells the reader to run a curl POST, but the-dbody isn't valid JSON. The nested objects and the root object are never closed, and it has a literal.... Anyone who copies the command, or an agent that runs it as written, sends a body the API can't parse.Fix
Replace the inline body with the same complete payload shown in Step 1 (the NPM
versionKeyand the PyPIpackageKey), so both steps match.Scope
This is the only curl example with an inline JSON body under
examples/anddocs/.Testing
I used the check from the issue: it pulls the
-dargument out of the bash block and parses it withjson.loads.Expecting property name enclosed in double quotes: line 8 column 9 (char 164)I didn't send a live request to the API.
Fixes #410