Failed to load API definition
erossini opened this issue · comments
I created a simple project where I added the latest version of the extension. I get this error:
Failed to load API definition
Fetch error
Unauthorized
I put my code here. I followed the steps in the project page. It was working perfectly on Azure until a couple of day ago. Locally is working.
{
"schemaValidationMessages": [
{
"level": "error",
"message": "Can't read from file https://azuks-test-q001.azurewebsites.net/api/swagger/json"
}
]
}
Update
For same reason, the code
param can't be the same for json
and UI
. If you open your Swagger url with Get Function url and copy the url from UI function, it is working.
Hi @erossini,
<PackageReference Include="AzureExtensions.Swashbuckle" Version="3.1.6" />
<PackageReference Include="AzureFunctions.Extensions.Swashbuckle" Version="1.4.4" />
1.4.4 is an old version, please use 3.1.6 only as it is a fork with updates
Yep, exactly. I've forked it, due to the repo is currently stale.
Fork => https://github.com/yuka1984/azure-functions-extensions-swashbuckle
Nuget
Nuget => https://www.nuget.org/packages/AzureExtensions.Swashbuckle/
@erossini Did upgrading it fix it for you? I'm on 3.1.6 and my swagger/ui function still can't access my swagger/json function without setting the swagger/json auth level to anonymous. Same error.
@erossini Did upgrading it fix it for you? I'm on 3.1.6 and my swagger/ui function still can't access my swagger/json function without setting the swagger/json auth level to anonymous. Same error.
Yes, but nothing changed, same errors. You can open the json copying the url of swagger
and paste it in the location bar. This is working