SOLR-18460: Ensure all curl commands follow the same pattern - #4925
Open
serhiy-bzhezytskyy wants to merge 1 commit into
Open
serhiy-bzhezytskyy wants to merge 1 commit into
serhiy-bzhezytskyy wants to merge 1 commit into
Conversation
Reordered every curl example in the ref guide to curl, URL, headers, then body; dropped -X POST wherever -d/--data/--data-binary already implies it (curl switches to POST on its own); and stripped the leading $ shell-prompt character from curl lines so examples can be copy-pasted directly.
Contributor
Author
|
@epugh tagging you since this is under SOLR-18459/SOLR-18460, which you filed. |
epugh
approved these changes
Sep 21, 2026
epugh
left a comment
Contributor
There was a problem hiding this comment.
This LGTM! I'm going to ping Jan and David as they may have opinons on the overall structure we chose, but the mechanics of this look great. I like all the clean ups.
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.
https://issues.apache.org/jira/browse/SOLR-18460
Description
Curl examples across the ref guide were inconsistent: some put the URL after the headers/body instead of right after
curl, most kept-X POSTalongside-d/--data/--data-binary(redundant, since curl already switches to POST when a body is given), and many started with a$shell-prompt character that breaks a direct copy-paste.Solution
Reordered every affected curl example to
curl 'URL' -H '...' -d '...'(or the multi-line equivalent for larger JSON bodies), dropped-X POSTwherever a body already implies it, and stripped the leading$from curl lines. Left-X POSTin place where there's no body at all (curl defaults to GET and needs the override) and on the one--upload-file/-Texample (that flag makes curl default to PUT, not POST, so removing-X POSTthere would silently change the request).44 files, all under
solr/solr-ref-guide/modules/*/pages/.Tests
Ran
./gradlew :solr:solr-ref-guide:buildLocalAntoraSiteand:checkSiteLinksbefore and after: same 6 pre-existing warnings (unrelated, tracked in #4922/SOLR-18464), no new ones, no broken links. Re-grepped the whole ref guide for the three rule clauses after the change: 0 remainingcurl … -X POST … (-d|--data)combinations, 0 remaining^$ curllines.AI-assisted (Claude Sonnet 5).