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

Align LogisticsEvents structure between DM and API #245

Open
lambertciata opened this issue Jul 8, 2024 · 5 comments
Open

Align LogisticsEvents structure between DM and API #245

lambertciata opened this issue Jul 8, 2024 · 5 comments
Assignees

Comments

@lambertciata
Copy link
Collaborator

lambertciata commented Jul 8, 2024

In current API specifications, LogisticsEvents can be filtered by event code defined as a string.
In current DM the event code is a CodeListElement.

We need to align on the structure and API specifications to either:

  • Put eventCode as a string again in the DM, and assess if some properties need to be put in the LogisticsEvent
  • Keep eventCode as a CodeListElement and update API specifications.

A side issue (x) would be that we need to better define Code Lists in CCL Ontology by adding code, codeDescription, codeListName, etc. when feasible.

@NiclasScheiber
Copy link
Contributor

NiclasScheiber commented Jul 9, 2024

Unsure about filtering LogisticsEvents being defined in API specs and handled server-side.
Filters are set based on business requirements by the client.
So they should compute the filter query on all returned LogisticsEvents from the /logistics-events endpoint. This also enables the client to filter for something else.

If the filter query is to stay in the API specs, an alternative would be to use LogisticsEvent#eventName for the filter.

Defining an eventCode by using a string only breaks when two separate codelists use the same code for different things.
If we do not hardcode the expected values, this will lead to ambiguity.
Hence the CodeListElement/RDF codelist, so that it is known where the code is from.

@NiclasScheiber
Copy link
Contributor

Adding another thought:

Changing the filter parameter from string to IRI would also work, as it is highly encouraged to link pre-existing code lists instead of instancing CodeListElements in LogisticsEvents.

For standardized event codes in air cargo, it is intended to use the StatusCode code list of the core code lists ontology. This should cover all inter-party use cases in this domain.

For use cases outside of air cargo, you can refer to the LogisticsStatus code list, for example, of UNCEFACT out of the box. For further use cases, parties may want to host their own code list vocabulary as linked data.

Instancing a CodeListElement as embedded object should only be used as a fallback mechanism. Hence, resolving and looking for a string in the code property is unnecessary.

@aloccid-iata
Copy link
Collaborator

To fix this problem I suggest:

  • Remove completely the eventType from the API
  • Open a new discussion about an additional filter logic that can be applied to any field in Logistics Object
  • Add sort and limit option on the API

@lambertciata
Copy link
Collaborator Author

Links to #267 and #268

@lambertciata
Copy link
Collaborator Author

See: 3cd15b8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

3 participants