From f721b33f668dfe2ce4201536f4df3d535dacd3ee Mon Sep 17 00:00:00 2001 From: Dominic Watson Date: Wed, 30 Oct 2024 14:27:09 +0000 Subject: [PATCH 1/4] [twgit] Init feature 'feature-DATAAPI-34_rendering-empty-non-simple-values'. From 740d735e01007fe87d690148cc269e366603f923 Mon Sep 17 00:00:00 2001 From: Dominic Watson Date: Wed, 30 Oct 2024 14:27:22 +0000 Subject: [PATCH 2/4] DATAAPI-34 if a custom renderer returns a complex value, just respect it and use it as the render - regardless of whether or not it has length. i.e. we want [] instead of "" returned if that is what the renderer wants. --- services/DataApiService.cfc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/DataApiService.cfc b/services/DataApiService.cfc index 908d5eb..219cf59 100644 --- a/services/DataApiService.cfc +++ b/services/DataApiService.cfc @@ -343,7 +343,7 @@ component { if ( $getContentRendererService().rendererExists( renderer, "dataapi" ) ) { try { var renderedContent = $renderContent( renderer, arguments.value, "dataapi", arguments.fieldSettings ); - if ( Len( renderedContent ?: "" ) ) { + if ( !IsSimpleValue( renderedContent ) || Len( renderedContent ?: "" ) ) { return renderedContent; } } catch( any e ) { From 7a56a0c1f5557514bdd070382d766734e43957e4 Mon Sep 17 00:00:00 2001 From: Dominic Watson Date: Wed, 30 Oct 2024 16:27:59 +0000 Subject: [PATCH 3/4] [twgit] Init hotfix 'hotfix-3.5.15'. From dd15a86dd340d6207f1bc1a0b345bd04f62f2277 Mon Sep 17 00:00:00 2001 From: Dominic Watson Date: Wed, 30 Oct 2024 16:28:58 +0000 Subject: [PATCH 4/4] changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e0f5462..d6d7e5d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## v3.5.15 + +* Non string renderers: respect returned data when it is an empty array or struct for rendering in results + ## v3.5.14 * Ability to set API level defaults for allowIdInsert and allowed verbs