From 982d437c63a0f347a490cc0ed0b3a4af240b7ed7 Mon Sep 17 00:00:00 2001 From: reluc Date: Mon, 14 Oct 2024 17:54:06 +0200 Subject: [PATCH 1/2] add explaination about how to get data without validation fix #554 --- index.html | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 0365920a..dfcba5e0 100644 --- a/index.html +++ b/index.html @@ -1024,6 +1024,17 @@

The InteractionOutput interface

[=Resolve=] |promise| with [[\value]]. +

+ While the {{value()}} function provides built-in validation, we recognize that some + use cases may require returning values without validation. In such cases, developers + can use alternative patterns, such as directly accessing the underlying data + using streams or the {{InteractionOutput/arrayBuffer()}} function (See [[[#validation-arraybuffer-example]]] and [[[#stream-example]]]). +

+

+ Warning: Disabling validation may introduce risks, particularly when interacting + with remote Things, as mismatches in data formats or schema expectations can lead to + unforeseen bugs and vulnerabilities. For more details, see the consumer assertions. +

The arrayBuffer() function

@@ -2472,10 +2483,25 @@

ConsumedThing Examples

// image: ArrayBuffer [0x1 0x2 0x3 0x5 0x15 0x23 ...] } +

Finally, the next two examples shows the usage of a {{ReadableStream}} from an {{InteractionOutput}}.

-
+      
         /*{
         "video": {
           "description" : "the video stream of this camera",

From 7dfafa8934370428ad0ac944a1b7205d7b63e74e Mon Sep 17 00:00:00 2001
From: Cristiano Aguzzi 
Date: Tue, 15 Oct 2024 10:47:56 +0200
Subject: [PATCH 2/2] fix "see comment"

Co-authored-by: danielpeintner 
---
 index.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/index.html b/index.html
index dfcba5e0..b3ac2680 100644
--- a/index.html
+++ b/index.html
@@ -1028,7 +1028,7 @@ 

The InteractionOutput interface

While the {{value()}} function provides built-in validation, we recognize that some use cases may require returning values without validation. In such cases, developers can use alternative patterns, such as directly accessing the underlying data - using streams or the {{InteractionOutput/arrayBuffer()}} function (See [[[#validation-arraybuffer-example]]] and [[[#stream-example]]]). + using streams or the {{InteractionOutput/arrayBuffer()}} function (see [[[#validation-arraybuffer-example]]] and [[[#stream-example]]]).

Warning: Disabling validation may introduce risks, particularly when interacting