From b34aa4da8a8fba63a5f3e83c56a8a91a44571077 Mon Sep 17 00:00:00 2001 From: steve-chavez Date: Thu, 4 Jan 2024 16:17:39 -0500 Subject: [PATCH] deprecate: params=single-object preference --- CHANGELOG.md | 4 ++++ src/PostgREST/ApiRequest/Preferences.hs | 1 + 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b05296b2f4..3c3aaa8883 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,10 @@ This project adheres to [Semantic Versioning](http://semver.org/). - #2887, Add Preference `max-affected` to limit affected resources - @taimoorzaeem +### Deprecated + + - `Prefer: params=single-object` is deprecated. Use [a function with a single unnamed JSON parameter](https://postgrest.org/en/latest/references/api/stored_procedures.html#s-proc-single-json) instead. - @steve-chavez + ## [12.0.2] - 2023-12-20 ### Fixed diff --git a/src/PostgREST/ApiRequest/Preferences.hs b/src/PostgREST/ApiRequest/Preferences.hs index 1b87746239..3bc6c50a24 100644 --- a/src/PostgREST/ApiRequest/Preferences.hs +++ b/src/PostgREST/ApiRequest/Preferences.hs @@ -232,6 +232,7 @@ instance ToHeaderValue PreferRepresentation where toHeaderValue HeadersOnly = "return=headers-only" -- | How to pass parameters to stored procedures. +-- TODO: deprecated. Remove on next major version. data PreferParameters = SingleObject -- ^ Pass all parameters as a single json object to a stored procedure. deriving Eq