Tufin / oasdiff

OpenAPI Diff and Breaking Changes
https://www.oasdiff.com
Apache License 2.0
689 stars 59 forks source link

Unmarshalling errors don't provide offset #524

Closed ikonst closed 4 months ago

ikonst commented 5 months ago

For example, given my OpenAPI spec I got the following error:

error unmarshaling JSON: while decoding JSON: json: cannot unmarshal array into field Schema.type of type string

The error doesn't have a line + offset or even a byte offset, making it impossible to determine the culprit.

reuvenharrison commented 5 months ago

Could you please provide instructions to replicate this problem?

ikonst commented 5 months ago

For example, try diffing between

e.g.

oasdiff diff https://production.rutterapi.com/openapi/specs/2023-02-07.yaml https://production.rutterapi.com/openapi/specs/2023-03-14.yaml
usualdesigner commented 4 months ago

Same. @reuvenharrison is there any update?

usualdesigner commented 4 months ago

Ahh, seems like it relates https://github.com/Tufin/oasdiff/issues/52

reuvenharrison commented 4 months ago

I haven't forgotten about this, just need to close some other issues before getting to this. Intuitively, without having replicated your examples yet, I would recommend verifying that your specs adhere to OAS 3.0 before running oasdiff. Not sure which tools are available to do this but perhaps the community can recommend some.

reuvenharrison commented 4 months ago

Yes, it's OAS 3.1 which is not supported by oasdiff.