Skip to content

Commit

Permalink
Remove @context
Browse files Browse the repository at this point in the history
  • Loading branch information
jason-fox committed Sep 26, 2024
1 parent 590cdd9 commit 5567d91
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 15 deletions.
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ This is a collection of **NGSI-v2** tutorials for the FIWARE system. Each tutori
demonstrate the correct use of individual FIWARE components and shows the flow of context data within a simple Smart
Solution either by connecting to a series of dummy IoT devices or manipulating the context directly or programmatically.

<!--
<!--- GLOBAL SUMMIT BANNER AD -->

<a href="https://www.fiware.org/global-summit/"><img src="https://fiware.github.io//catalogue/img/Summit24.png" width="240" height="70" /></a> <a href="https://www.eventbrite.de/e/fiware-tech-training-naples-tickets-920143322447"><img src="https://fiware.github.io//catalogue/img/Training24.png" width="240" height="70" /></a>
-->


<blockquote>
<h3>Should I use NGSI-v2 or NGSI-LD?</h3>
Expand Down
21 changes: 8 additions & 13 deletions docs/relationships-linked-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -496,15 +496,13 @@ However since the full context has been supplied in the `Link` header, the short
```json
[
{
"@context": "http://context/user-context.jsonld",
"id": "urn:ngsi-ld:Product:001",
"type": "Product",
"name": "Apples",
"price": 0.99,
"size": "S"
},
{
"@context": "http://context/user-context.jsonld",
"id": "urn:ngsi-ld:Product:002",
"type": "Product",
"name": "Bananas",
Expand Down Expand Up @@ -548,7 +546,6 @@ Once again the short names are returned.
```json
[
{
"@context": "http://context/user-context.jsonld",
"id": "urn:ngsi-ld:Shelf:unit001",
"type": "Shelf",
"name": "Corner Unit",
Expand All @@ -558,7 +555,6 @@ Once again the short names are returned.
}
},
{
"@context": "http://context/user-context.jsonld",
"id": "urn:ngsi-ld:Shelf:unit002",
"type": "Shelf",
"name": "Wall Unit 1",
Expand Down Expand Up @@ -602,7 +598,7 @@ The short names have been returned since the `@context` has been supplied in the

```json
{
"@context": "https://fiware.github.io/tutorials.Step-by-Step/datamodels-context.jsonld",
"@context": "http://context/user-context.jsonld",
"id": "urn:ngsi-ld:Shelf:unit001",
"type": "Shelf",
"name": "Corner Unit",
Expand Down Expand Up @@ -656,15 +652,14 @@ Note that the relationship is currently unidirectional. **Shelf** ➡ **Building
#### 5 Request:

```bash
curl -X POST \
curl -iX POST \
http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:Shelf:unit001/attrs \
-H 'Content-Type: application/ld+json' \
-H 'fiware-servicepath: /' \
-d '{
"numberOfItems": {"type": "Property","value": 50},
"stocks": {
"type": "Relationship",
"object": "urn:ngsi-ld:Product:001"
"object": "urn:ngsi-ld:Product:001"
},
"locatedIn" : {
"type": "Relationship", "object": "urn:ngsi-ld:Building:store001",
Expand Down Expand Up @@ -713,22 +708,22 @@ passed in the previous request.
"@context": "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.6.jsonld",
"id": "urn:ngsi-ld:Shelf:unit001",
"type": "https://fiware.github.io/tutorials.Step-by-Step/schema/Shelf",
"name": {
"http://schema.org/name": {
"type": "Property",
"value": "Corner Unit"
},
"https://fiware.github.io/tutorials.Step-by-Step/schema/locatedIn": {
"type": "Relationship",
"object": "urn:ngsi-ld:Building:store001",
"installedBy": {
"https://fiware.github.io/tutorials.Step-by-Step/schema/installedBy": {
"type": "Relationship",
"object": "urn:ngsi-ld:Person:employee001"
},
"requestedBy": {
"https://fiware.github.io/tutorials.Step-by-Step/schema/requestedBy": {
"type": "Relationship",
"object": "urn:ngsi-ld:Person:bob-the-manager"
},
"statusOfWork": {
"https://fiware.github.io/tutorials.Step-by-Step/schema/statusOfWork": {
"type": "Property",
"value": "completed"
}
Expand Down Expand Up @@ -839,7 +834,7 @@ curl -G -X GET \

```json
{
"@context": "https://fiware.github.io/tutorials.Step-by-Step/datamodels-context.jsonld",
"@context": "http://context/user-context.jsonld",
"id": "urn:ngsi-ld:Shelf:unit001",
"type": "Shelf",
"locatedIn": "urn:ngsi-ld:Building:store001"
Expand Down

0 comments on commit 5567d91

Please sign in to comment.