docs(api): link POST/DELETE shared/directories and document DELETE path encoding - #534
Merged
Merged
Conversation
…ent DELETE path encoding The endpoint index listed only GET and PUT /shared/directories; the POST and DELETE sections existed in the body but were unreachable from the summary. Add the two missing links. Also document what the DELETE query parameter requires: the exact path GET returned, percent-encoded, matched byte-for-byte. Add a Windows example alongside the POSIX one so the backslash / drive-letter / space encoding is shown rather than left to the reader.
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.
Follow-up to #531, tightening the reference docs for the shared-directories endpoints — no code change.
Two fixes:
Index was incomplete. The endpoint summary listed only
GETandPUT /shared/directories. ThePOSTandDELETEsections were fully written in the body but had no link from the index, so they were only findable by scrolling. Added the two missing entries.DELETE encoding was underspecified.
DELETEtakes the path as a query parameter, and the docs didn't state two things a client needs: the value must be the exact stringGETreturned (the daemon matches it byte-for-byte), and it must be percent-encoded. Added that note plus a Windows example (C:\Users\bob\My Shares→path=C%3A%5CUsers%5Cbob%5CMy%20Shares) next to the existing POSIX one, so the backslash / drive-letter-colon / space encoding is shown rather than left to the reader to work out.The byte-for-byte match is the existing behaviour (
Api.cpp,it->path == wanted), not a change — the docs just now describe it.While here I audited the whole reference: every documented endpoint is now linked from the index, and all in-page anchors resolve. The server
ip:portaliases stay folded into their{ecid}index lines (annotated "ECID orip:port"), matching the existing convention.