Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GeoProperty which is not location cannot be created. #1318

Closed
jason-fox opened this issue Jan 17, 2025 · 1 comment · Fixed by #1319
Closed

GeoProperty which is not location cannot be created. #1318

jason-fox opened this issue Jan 17, 2025 · 1 comment · Fixed by #1319

Comments

@jason-fox
Copy link
Contributor

I have the following user context:

{
      "@context": {
          "TripRequest": "https://example.com/TripRequest/schema.json",
          "startLocation": "https://example.com/TripRequest/schema.json#startLocation",
          "targetLocation":"https://example.com/TripRequest/schema.json#targetLocation"
          
      }
}

I create an entity with my GeoPropertty:

curl -L 'http://localhost:8080/ngsi-ld/v1/entities/' \
-H 'Content-Type: application/ld+json' \
--data-raw '{
    "id": "urn:ngsi-ld:TripRequest:0001",
    "type": "TripRequest",
    "startLocation": {
        "type": "GeoProperty",
        "value": {
             "type": "Point",
             "coordinates": [13.3505, 52.5144]
        }
    },
    "@context": "http://context/user-context.jsonld"
}'

I obtain an error response.

{
    "type": "https://uri.etsi.org/ngsi-ld/errors/BadRequestData",
    "title": "GeoProperty https://example.com/TripRequest/schema.json#startLocation has an instance without a value",
    "status": 400,
    "detail": "If you have difficulty identifying the exact cause of the error, please check the list of some usual causes on https://stellio.readthedocs.io/en/latest/TROUBLESHOOT.html . If the error is still not clear or if you think it is a bug, feel free to open an issue on https://github.com/stellio-hub/stellio-context-broker",
    "instance": "/ngsi-ld/v1/entities"
}

Note that location would work correctly in this case, it is only with additional GeoProperty attributes.

@bobeal bobeal linked a pull request Jan 18, 2025 that will close this issue
@bobeal
Copy link
Member

bobeal commented Jan 18, 2025

Indeed, only core geoproperties (location, observationSpace and operationSpace) are correctly handled. There is a PR ready for review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants