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

"Error resolving reference/map key not found" when running oasdiff across the set of files with intensive external refs #504

Open
anikitin opened this issue Mar 8, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@anikitin
Copy link

anikitin commented Mar 8, 2024

I am experimenting with oasdiff in composed mode against OpenAPI files which have many cross-file $refs.
I found a strange issue where an error (or errors) appear from time to time.
Sometimes it passes without issues, and sometimes it fails with an error like this (could be in different files about different schemas):

Error: failed to load base specs from glob "../api-metadata-specs2/openapi/jws-json-rpc/*-openapi.yml": failed to load "..\\api-metadata-specs2\\openapi\\jws-json-rpc\\jws-billing-openapi.yml": error resolving reference "jws-digitalline-openapi.yml#/components/schemas/PhoneLineAssignment": error resolving reference "jws-extensions-openapi.yml#/components/schemas/ExtensionBriefInfo": map key "ShippingInfo" not found 

I use oasdiff version 1.10.11.
The problem can be also reproduced in non-composed mode. It seems to be sourced in kin-openapi.
I could not create an isolated test to reproduce.
Provided a subset of our OpenAPI files to reproduce to @reuvenharrison privately.

@anikitin anikitin added the bug Something isn't working label Mar 8, 2024
@reuvenharrison
Copy link
Collaborator

The error is coming from ResolveRefsIn function in https://github.com/getkin/kin-openapi
@fenollp - can we share the files with you privately?

@reuvenharrison
Copy link
Collaborator

Hi @anikitin
Could you please check if this is resolved by #575 which is included in the latest release?

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

2 participants