opentripmodel / otm5-change-requests

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

Validation endpoint for transportOrders profile not checking the constraints #83

Closed Michiel-s closed 3 months ago

Michiel-s commented 11 months ago

Type of bug

Describe the bug The rules for the transport order profile as defined at this page are not evaluated by the validation endpoint for transport orders.

To Reproduce Steps to reproduce the behavior:

  1. Open a REST client
  2. Perform a PUT operation on https://otm5-documentation-api.services.simacan.com/api/v5/validate/transportOrders with header Content-Type: application/json and the body below.
  3. Notice that the validation tool return 200 OK.
  4. Notice that the body doesn't comply to e.g. the rule: A consignment must have at least one goods item to be transported.

Body

{
  "consignments": [
    {
      "associationType": "inline",
      "entity": {
        "goods": [
        ]
      }
    }
  ]
}

Expected behavior Validation tool to check and report all the rules as mentioned in the transport order profile:

Screenshots image

bmeesters commented 11 months ago

Thanks, I'll double check why not the same rules have applied.

ESchouten commented 9 months ago

Any news on this?

bmeesters commented 9 months ago

@ESchouten Sorry no news. It does not get any priority at the moment. So I cannot give you a date.

bmeesters commented 3 months ago

Since TNO is working on a tool that can do this and more we expect that the validation tool can be deprecated and turned off. So we will not fix it (even though we agree that this is a bug).

Michiel-s commented 1 month ago

The JSON validator module is ready and integrated in Semantic Treehouse. The running instance at https://sutc.semantic-treehouse.nl is at the disposal of the OTM team.

OTM profiles need to be registered in order to configure the validator. That is work to be done.

It is possible to either upload a json schema as validation artefact for the profile or let Semantic Treehouse generate the json schema.