opentripmodel / otm5-change-requests

Tracking and reporting bugs and change requests of the OTM5 specification.
5 stars 1 forks source link

Indicate the degree of obligation or enforceability of a constraint #75

Closed filogic closed 11 months ago

filogic commented 1 year ago

Type of request

Is your feature request related to a problem? Currently, there is no standardized way to indicate the degree of obligation or enforceability of a constraint. While constraints themselves can be specified and defined, there is no universal method for indicating whether a constraint is a hard requirement that must be followed, or a more lenient recommendation. This lack of clarity can make it difficult for systems to know how strictly they need to adhere to a particular constraint, which can lead to confusion and inconsistency in enforcement. As such, there is a need for a clearer and more standardized approach to indicating the degree of obligation or enforceability of constraints.

Describe the solution you'd like To address the lack of clarity around the degree of obligation or enforceability of constraints, we propose the addition of a new property to constraints called "enforceability". This property would be an enumerated type, with two possible values:

An enforced-constraint would indicate that the restriction is an absolute requirement that must be followed, while a preference-constraint would indicate that the restriction is a recommendation or preference, but not an absolute requirement.

By adding this property to constraints, we can provide a clearer indication of how strictly a particular constraint needs to be adhered to, which can improve consistency in enforcement and reduce confusion for individuals and organizations trying to follow the restrictions.

The following code-fragment depicts how a hard-constraint can be described in OTM:

{
   "id": "89a7bb4d-8720-4db9-aef7-4c3309186c3e",
   "name": "Example hard constraint",
   "creationDate": "2023-03-28",
   "creationDate": null,
   "contextEvents": null,
   "value": { ... },
   "enforceability": "enforced",
   "externalAttributes": null,
}

Describe alternatives you've considered An alternative for the "enforceability" property could be "constrainLevel" with enum "mandatory", "voluntary":

{
   "id": "89a7bb4d-8720-4db9-aef7-4c3309186c3e",
   "name": "Example hard constraint",
   "creationDate": "2023-03-28",
   "creationDate": null,
   "contextEvents": null,
   "value": { ... },
   "constraintLevel": "mandatory", "voluntary",
   "externalAttributes": null,
}
bmeesters commented 1 year ago

I am all in favor of this change. Let's discuss it during the next meeting we have

bmeesters commented 1 year ago

Discussed within the group and all are in favor. Question that did pop up is where OTM ends. Since we are gradually increasing more map related data

thomaskolmans commented 1 year ago

RFC 2445 iCal specificatie: https://www.ietf.org/rfc/rfc2445.txt

Google rfc 2445: https://github.com/jcvanderwal/google-rfc-2445

bmeesters commented 1 year ago

Accepted. If the field is not present it should be interpreted as mandatory to ensure backwards compatibility.

bmeesters commented 11 months ago

This is now part of OTM5.6 so can be closed.