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

fix: vnext schema refs #185

Open
wants to merge 4 commits into
base: vnext
Choose a base branch
from
Open

fix: vnext schema refs #185

wants to merge 4 commits into from

Conversation

dpwdec
Copy link
Contributor

@dpwdec dpwdec commented Jun 18, 2024

About the PR

Some tests

@dpwdec dpwdec requested a review from VisualBean as a code owner June 18, 2024 12:07
@dpwdec dpwdec changed the title Vnext schema refs fix: vnext schema refs Jun 18, 2024
@@ -426,6 +429,8 @@ public string Load(string reference)
userName:
description: User name.
type: string
orderHistory:
$ref: '#/components/OrderHistory'
Copy link
Collaborator

@VisualBean VisualBean Jul 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these component refs are wrong.
its usually #/components/{componentType}/{refId}, which also means the components object is technically invalid in this test.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @VisualBean I've updated with valid componentType object now I think. It's still not resolving though so I think the initial thought about internals not being resolved in externals is still valid.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ive debugged through it, and it seems to stem from the externalReferenceResolver.
Basically when the external reference is loaded, the subreferences are internal. So the ResolveReference method simply returns null.

if (reference.IsExternal)
{
   ...
   return externalAsyncApiContent;
}

return null;

So - hopefully my referenceresolution followup PR will fix it.

@VisualBean VisualBean force-pushed the vnext branch 2 times, most recently from 5d95d59 to a9d501d Compare August 12, 2024 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants