opentripmodel / otm5-change-requests

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

OTM5 swagger.json fails validation in MuleSoft #66

Closed florian-baltes-nextview closed 3 months ago

florian-baltes-nextview commented 1 year ago

Type of bug

Describe the bug The current OTM5-Specification can not be imported into MuleSoft as it fails the built in validation in three different places:

Line  Error
9894 Error: 'eventType' is duplicated in 'required' property
13727 Error: 'eventType' is duplicated in 'required' property
26670 Error: Name Bearer token does not match regular expression ^[a-zA-Z0-9\.\-_]+$ for component declarations

To Reproduce Steps to reproduce the behavior:

  1. Try to published the imported OTM5 swagger.json file
  2. See validation errors

Expected behavior Validation for OTM5 swagger.json file should pass

Screenshots n/a

Technical information (only if the bug is a fault in the rendering) n/a

Additional context n/a

florian-baltes-nextview commented 1 year ago

MuleSoft validates the OTM5 swagger.json file after I performed the following operations on it:

bmeesters commented 1 year ago

Hello @florian-baltes-nextview, thanks for your contribution. I do have a few follow up questions:

florian-baltes-nextview commented 1 year ago

Hello @bmeesters. Thank you for picking this up so fast:

For line 9894, the json (downloaded today from https://otm5.opentripmodel.org/) looks like this to me: Screenshot 2022-11-21 at 17 31 09

You can see that the "eventType", line is duplicate. This is causing the validation to fail. Same applies to line 13727: Screenshot 2022-11-21 at 17 34 00

bmeesters commented 1 year ago

Thanks, I downloaded the file from this repository, but it seems those are not in sync. I'll see if I can get rid of the duplicate lines. Note that the swagger is generated, so it is not that easy to just remove them since then we have to check it every time we make a change again. Any way, this is worth fixing, cannot promise yet when though.

florian-baltes-nextview commented 1 year ago

Thank you @bmeesters. there is no time criticality for me here as I fixed those lines myself. I just thought its worth mentioning :)

bmeesters commented 1 year ago

Alright good to know! And thanks for bringing it up, always nice if people help getting OTM5 better! I'll keep the issue open until it is actually fixed so you get a notification whenever that happens.

bmeesters commented 3 months ago

Since Mulesoft is closed software we will close this issue. We will take into account the feedback we got regarding duplicate discriminators and separate strings for the next version though to avoid the problems where possible.