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

Failed to load API definition - value cannot be null #286

Open
jaltenbernd opened this issue Jan 9, 2024 · 1 comment
Open

Failed to load API definition - value cannot be null #286

jaltenbernd opened this issue Jan 9, 2024 · 1 comment
Assignees
Labels
waiting-8-days Closing after 8 days of waiting for the additional info requested.

Comments

@jaltenbernd
Copy link

jaltenbernd commented Jan 9, 2024

Getting the "Failed to load API definition" for my .NET 8 Azure Function Out-of-Process. For that, I have to use the library: Microsoft.Azure.Functions.Worker.Extensions.OpenApi instead of the Swagger pkg for WebAPIs.

My SwaggerEndPoint URL to the swagger.json file for this one API is correct. All my others APIs come up fine, but this is the only one I have as an Azure Function. Is that the issue? Too new?

The error log is:

SpanId: 2717d8553f5ab08f
TraceId: 9a968178b49be163e93bd71dd11d3aa1
ParentId: 0000000000000000
ConnectionId: 0HN0GLREKVDEB
RequestId: 0HN0GLREKVDEB:0000000B
RequestPath: /swagger/docs/v1/tenant

An unhandled exception has occurred while executing the request.

Exception: 
System.ArgumentNullException: Value cannot be null. (Parameter 'source')
   at System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
   at System.Linq.Enumerable.Cast[TResult](IEnumerable source)
   at MMLib.SwaggerForOcelot.Transformation.SwaggerJsonTransformer.RemoveItems[T](JToken token, JToken paths, Func`2[] searchPaths)
   at MMLib.SwaggerForOcelot.Transformation.SwaggerJsonTransformer.TransformSwagger(JObject swagger, IEnumerable`1 routes, String hostOverride, SwaggerEndPointOptions endPointOptions)
@Burgyn
Copy link
Owner

Burgyn commented Jan 12, 2024

Hi @jaltenbernd ,

Please add ocelot.json and dowstream OpenAPI json documentation with minimal configuration to reproduce this error.

Thanks.

@Burgyn Burgyn added the waiting-8-days Closing after 8 days of waiting for the additional info requested. label Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting-8-days Closing after 8 days of waiting for the additional info requested.
Projects
None yet
Development

No branches or pull requests

2 participants