openepcis / openepcis-models

EPCIS 2.0 Java Models
https://openepcis.io
Apache License 2.0
0 stars 2 forks source link

OEPCIS-698: removing empty object and empty array from context during… #27

Closed Aravinda93 closed 1 year ago

Aravinda93 commented 1 year ago

Hi @sboeckelmann

This PR contains the fixes associated with the context-related issues during the capture or query of an EPCIS document or bare event.

Previously /events was adding the empty object into the context:

"@context": [
        "https://ref.gs1.org/standards/epcis/2.0.0/epcis-context.jsonld",
        {}
    ],

Also during the capture of the bare event the returned response contained the empty context array, if you observe the type appears twice in the returned response:

{
    "type": "ObjectEvent",
    "@context": [],
    "type": "ObjectEvent",

This PR along with another PR on GitLab openepcis-core, should fix these issues: https://code.company-group.com//openepcis/openepcis-core/-/merge_requests/24

Kindly request you to review both the PR and approve.