You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I set the ReferenceResolution as ReferenceResolutionSetting.ResolveAllReferences and the message payload is referencing an external file, that file is not loaded
To Reproduce
Having an AsyncAPI V3 where the message payload is an external file and mark to resolve all references
Something went wrong trying to fetch './AsyncApiSchema_MessagePayload.yml. Could not find file '<READACT>\AsyncAPI.NET\test\ByteBard.AsyncAPI.Tests\bin\Debug\net8.0\AsyncApiSchema_MessagePayload.yml'.'
Expected behaviour
The diagnostic should be empty
Sample document
Async file:
asyncapi: 3.0.0info:
title: Streetlights Kafka APIversion: 1.0.0description: The Smartylighting Streetlights API allows you to remotely manage the city lights.license:
name: Apache 2.0url: https://www.apache.org/licenses/LICENSE-2.0channels:
mychannel:
messages:
whatever:
payload:
$ref: "./AsyncApiSchema_MessagePayload.yml"
changed the title [-]With AsyncAPI V3, AsyncAPI.NET isn't able to load external file[/-][+]AsyncAPI.NET isn't able to load external file[/+]on Oct 24, 2025
I was wrong in my first assumption. you never hit the switch case. the uri is relative, and thus throws on the .Scheme call in the switch. I've added a PR to fix it.
Activity
[-]With AsyncAPI V3, AsyncAPI.NET isn't able to load external file[/-][+]AsyncAPI.NET isn't able to load external file[/+]github-actions commentedon Oct 24, 2025
Welcome to AsyncAPI.NET. Thank you for reporting your first issue. Please check out our contributors guide.
VisualBean commentedon Oct 24, 2025
Oh snap! I'll look into it when I get back near a pc. Thanks you for reporting this.
VisualBean commentedon Oct 24, 2025
I was wrong in my first assumption. you never hit the switch case. the uri is relative, and thus throws on the
.Schemecall in the switch. I've added a PR to fix it.VisualBean commentedon Oct 25, 2025
Would you like the ability to provide a baseUri for relative uris to be resolved against? or just resolve against the current working dir?
VisualBean commentedon Dec 7, 2025
fixed as of 2.1.2 (beta release here https://www.nuget.org/packages/ByteBard.AsyncAPI.NET/)