Skip to content

Allow object-aware external dereference component keys#490

Open
ayushshrivastv wants to merge 6 commits intomattpolzin:mainfrom
ayushshrivastv:ExternalLoader.swift
Open

Allow object-aware external dereference component keys#490
ayushshrivastv wants to merge 6 commits intomattpolzin:mainfrom
ayushshrivastv:ExternalLoader.swift

Conversation

@ayushshrivastv
Copy link
Copy Markdown
Contributor

Closes #438

Summary

  • add an object-aware ExternalLoader.componentKey overload in both OpenAPIKit variants
  • keep the URL-only key path as the compatibility fallback so loaders can implement either form
  • compute external reference component keys after loading so the decoded value can inform the key
  • add regression tests covering the object-aware override path and the default compatibility path

Testing

  • swift test --filter JSONReferenceTests
  • swift test --filter ExternalDereferencingDocumentTests

@mattpolzin
Copy link
Copy Markdown
Owner

Heads up, I had assigned the issue you are closing with this PR to myself to indicate that I was going to explore the issue (and had not decided what I think a solution should look like yet). I may look over this PR eventually and see if it happens to look just right, but there's a good chance I won't merge this branch. Sorry if the issue assignment was not a clear enough indicator that the issue was spoken for.

@ayushshrivastv
Copy link
Copy Markdown
Contributor Author

ayushshrivastv commented Mar 26, 2026

@mattpolzin Thanks for letting me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

More informed external dereference component key function

2 participants