Skip to content

Commit

Permalink
Explain null example
Browse files Browse the repository at this point in the history
  • Loading branch information
HeikoTheissen committed Oct 25, 2024
1 parent 36dc1d6 commit 69aa249
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
6 changes: 3 additions & 3 deletions docs/odata-json-format/odata-json-format.html
Original file line number Diff line number Diff line change
Expand Up @@ -1313,12 +1313,12 @@ <h1 id="11-individual-property-or-operation-response"><a id="IndividualPropertyo
<span id="cb32-4"><a href="#cb32-4" aria-hidden="true" tabindex="-1"></a><span class="fu">}</span></span></code></pre></div>
</div>
<div class="example">
<p>Example 31: <code>null</code> value accompanied by an instance annotation</p>
<p>Example 31: An action is invoked when a utilities customer moves into a building, it returns the address. After a successful move-in it might return the <code>null</code> value accompanied by an instance annotation:</p>
<div class="sourceCode" id="cb33"><pre class="sourceCode json"><code class="sourceCode json"><span id="cb33-1"><a href="#cb33-1" aria-hidden="true" tabindex="-1"></a><span class="fu">{</span></span>
<span id="cb33-2"><a href="#cb33-2" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;@context&quot;</span><span class="fu">:</span> <span class="st">&quot;http://host/service/$metadata#Model.Address&quot;</span><span class="fu">,</span></span>
<span id="cb33-3"><a href="#cb33-3" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;@Core.Messages&quot;</span><span class="fu">:</span> <span class="ot">[</span><span class="fu">{</span></span>
<span id="cb33-4"><a href="#cb33-4" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;code&quot;</span><span class="fu">:</span> <span class="st">&quot;EPOSTCODE&quot;</span><span class="fu">,</span></span>
<span id="cb33-5"><a href="#cb33-5" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;message&quot;</span><span class="fu">:</span> <span class="st">&quot;Could not resolve postcode XYZ&quot;</span><span class="fu">,</span></span>
<span id="cb33-4"><a href="#cb33-4" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;code&quot;</span><span class="fu">:</span> <span class="st">&quot;EADDRESS&quot;</span><span class="fu">,</span></span>
<span id="cb33-5"><a href="#cb33-5" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;message&quot;</span><span class="fu">:</span> <span class="st">&quot;Street name not yet determined&quot;</span><span class="fu">,</span></span>
<span id="cb33-6"><a href="#cb33-6" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;severity&quot;</span><span class="fu">:</span> <span class="st">&quot;error&quot;</span></span>
<span id="cb33-7"><a href="#cb33-7" aria-hidden="true" tabindex="-1"></a> <span class="fu">}</span><span class="ot">]</span></span>
<span id="cb33-8"><a href="#cb33-8" aria-hidden="true" tabindex="-1"></a><span class="fu">}</span></span></code></pre></div>
Expand Down
8 changes: 5 additions & 3 deletions docs/odata-json-format/odata-json-format.md
Original file line number Diff line number Diff line change
Expand Up @@ -1974,13 +1974,15 @@ Example 30: empty collection of complex values
:::

::: example
Example 31: `null` value accompanied by an instance annotation
Example 31: An action is invoked when a utilities customer moves into a building,
it returns the address. After a successful move-in it might return the
`null` value accompanied by an instance annotation:
```json
{
"@context": "http://host/service/$metadata#Model.Address",
"@Core.Messages": [{
"code": "EPOSTCODE",
"message": "Could not resolve postcode XYZ",
"code": "EADDRESS",
"message": "Street name not yet determined",
"severity": "error"
}]
}
Expand Down
8 changes: 5 additions & 3 deletions odata-json-format/10 Media Entity.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,15 @@ Example ##ex: empty collection of complex values
:::

::: example
Example ##ex: `null` value accompanied by an instance annotation
Example ##ex: An action is invoked when a utilities customer moves into a building,
it returns the address. After a successful move-in it might return the
`null` value accompanied by an instance annotation:
```json
{
"@context": "http://host/service/$metadata#Model.Address",
"@Core.Messages": [{
"code": "EPOSTCODE",
"message": "Could not resolve postcode XYZ",
"code": "EADDRESS",
"message": "Street name not yet determined",
"severity": "error"
}]
}
Expand Down

0 comments on commit 69aa249

Please sign in to comment.