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

Unmarshalling errors don't provide offset #524

Closed
ikonst opened this issue Apr 9, 2024 · 6 comments
Closed

Unmarshalling errors don't provide offset #524

ikonst opened this issue Apr 9, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@ikonst
Copy link

ikonst commented Apr 9, 2024

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.

@ikonst ikonst added the bug Something isn't working label Apr 9, 2024
@reuvenharrison
Copy link
Collaborator

Could you please provide instructions to replicate this problem?

@ikonst
Copy link
Author

ikonst commented Apr 10, 2024

For example, try diffing between

  • https://production.rutterapi.com/openapi/specs/2023-02-07.yaml
  • https://production.rutterapi.com/openapi/specs/2023-03-14.yaml

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
Copy link

Same. @reuvenharrison is there any update?

@usualdesigner
Copy link

Ahh, seems like it relates #52

@reuvenharrison
Copy link
Collaborator

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
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants