-
Type: Improvement
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: V4.01_OS
-
Fix Version/s: V4.01_ERRATA01
-
Component/s: JSON Format
-
Labels:None
-
Environment:
Closed as applied 2023-10-25
-
Proposal:
-
Resolution:
1. Edm.Stream-typed function parameters in URLs
Today, the option to pass a value to an Edm.Stream-typed parameter in a request addressing a function import requires to look at different places and combine the individual steps (analogous for function calls):
- Section on Addressing Functions in the URL conventions spec refers to certain ABNF rules (e.g., primitiveFunctionImportCall) that eventually lead to either rule parameterAlias or primitiveLiteral.
- Following parameterAlias, section 5.3 Parameter Aliases in the same spec explains the relation to ABNF rule aliasAndValue, which finally gets us to parameterValue with arrayOrObject as one of the options.
- Section 5.1.1.14.2 Complex and Collection Literals in the same spec defines the use of this ABNF rule arrayOrObject for complex and collection literals, but not for JSON documents as values of Edm.Stream-typed properties.
- So, the only escape is to go the other route and use commonExpr, which is the other choice for arrayOrObject. This can become a primitiveValue, which includes a comment that strings can be used for JSON documents
- So, finally we have found a rule to pass such a stream value
It should be discussed if the consumption of this feature could be simplified by making it more explicit in the URL conventions spec.
2. Edm.Stream-typed action parameters in request body and function and action return types in response body
Section 9 Stream Property in the JSON Format spec defines the representation of stream properties of media type JSON. It should be clarified that these rules are also applicable to function and action parameters as well as return types.