Skip to content
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

[Schema Inaccuracy] remove redundant space in curl code examples which prevents copying and using the sample as-is #1410

Open
cmwilson21 opened this issue Aug 4, 2022 · 2 comments

Comments

@cmwilson21
Copy link

This is being copied from the open source repo, PR 19442
(Automation in rest-schema label did not copy it over)

Schema Inaccuracy

  • Go to any page showing a code sample (e.g. this page)
  • Click on the "cURL" tab
  • Copy the sample (either by clicking on the copy button, or selecting and copying the code sample)
  • Paste the code sample in a terminal and run it

Expected

cURL command will run and return an error (e.g. bad credentials)

Actual
cURL command does not run properly and is split to 2 separate commands:

$ curl \
>   -H "Accept: application/vnd.github+json" \ 
curl: (3) URL using bad/illegal format or missing URL
$   -H "Authorization: token <TOKEN>" \
>   https://api.github.com/user/repository_invitations
-H: command not found
@saerosV
Copy link

saerosV commented Aug 26, 2022

Hi @cmwilson21.

Any progress on this? The changes made by Ori Hoch back in PR 19442 can be pretty much merged as they are.

To corroborate his findings, here is ShellCheck's output after pasting one of the affected Code Samples in it:

image

And here's the full ShellCheck documentation for the error, for a more detailed report.

@cmwilson21
Copy link
Author

@saerosV Thanks for checking in! This issue is currently on the board waiting for review. We appreciate your patience as we are working through our backlog. 💛

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants