From 878ce2f206581a7e2b0f43c8d8b846f0f8441095 Mon Sep 17 00:00:00 2001 From: Mark Haines Date: Tue, 8 Dec 2015 14:32:11 +0000 Subject: [PATCH 1/3] Allow the filter JSON to be passed inline in the /sync request --- api/client-server/sync.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api/client-server/sync.yaml b/api/client-server/sync.yaml index 4b399d07dcb..7ce04c3f8d4 100644 --- a/api/client-server/sync.yaml +++ b/api/client-server/sync.yaml @@ -32,7 +32,9 @@ paths: name: filter type: string description: |- - The ID of a filter created using the filter API. + The ID of a filter created using the filter API or a filter JSON + object. The server will detect whether it is an ID or a JSON object + by whether the first character is a ``"{"`` open brace. x-example: "66696p746572" - in: query name: since From ed70bcb180e20448ea12a8b6e8924a341eafdbc5 Mon Sep 17 00:00:00 2001 From: Mark Haines Date: Tue, 8 Dec 2015 14:36:50 +0000 Subject: [PATCH 2/3] Add a rationale for allowing both inline filters and passing filters by id. --- api/client-server/sync.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/api/client-server/sync.yaml b/api/client-server/sync.yaml index 7ce04c3f8d4..239cce891ab 100644 --- a/api/client-server/sync.yaml +++ b/api/client-server/sync.yaml @@ -34,7 +34,10 @@ paths: description: |- The ID of a filter created using the filter API or a filter JSON object. The server will detect whether it is an ID or a JSON object - by whether the first character is a ``"{"`` open brace. + by whether the first character is a ``"{"`` open brace. Passing the + JSON inline is best suited to one off requests. Creating a filter + using the filter API is recommended for clients that reuse the same + filter multiple times, for example in long poll requests. x-example: "66696p746572" - in: query name: since From c3a131888613519bcc1ada2e06720287bc5059b8 Mon Sep 17 00:00:00 2001 From: Mark Haines Date: Wed, 9 Dec 2015 10:50:02 +0000 Subject: [PATCH 3/3] Make it explicit that the JSON filter object is passed as a string --- api/client-server/sync.yaml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/api/client-server/sync.yaml b/api/client-server/sync.yaml index 239cce891ab..eeed2e82b65 100644 --- a/api/client-server/sync.yaml +++ b/api/client-server/sync.yaml @@ -33,11 +33,12 @@ paths: type: string description: |- The ID of a filter created using the filter API or a filter JSON - object. The server will detect whether it is an ID or a JSON object - by whether the first character is a ``"{"`` open brace. Passing the - JSON inline is best suited to one off requests. Creating a filter - using the filter API is recommended for clients that reuse the same - filter multiple times, for example in long poll requests. + object enocoded as a string. The server will detect whether it is + an ID or a JSON object by whether the first character is a ``"{"`` + open brace. Passing the JSON inline is best suited to one off + requests. Creating a filter using the filter API is recommended for + clients that reuse the same filter multiple times, for example in + long poll requests. x-example: "66696p746572" - in: query name: since