Azure / Azure/azure-functions-openapi-extension

BUG: Object reference not set.... .net 6 functions

Open
#352 16 comments 6 reactions 0 assignees View on GitHub
bug Needs: Triage (Functions)
Dominant language
C#
Stars
388
Forks
202
PR merge metrics
No merged PRs in 30d

Description

**Describe the issue**
When using this library in a new Azure Functions project (.net6, runtime V4) it works locally but not on Azure.

`Object reference not set to an instance of an object.`

**To Reproduce**
1. Create new Azure functions project with .Net 6
2. Add a new project without dependencies and reference it in your functions project
3. Deploy to Azure
4. Call `/api/swagger.json`

**Expected behavior**
I expect that swagger would just work like it does locally.

**Screenshots**

![image](https://user-images.githubusercontent.com/1292510/152005361-87741b39-4d27-450d-a6b7-0bb5db80fbb5.png)

**Environment (please complete the following information, if applicable):**
- OS: Azure (Windows Service plan, `FUNCTIONS_EXTENSION_VERSION` = `~4`, `FUNCTIONS_WORKER_RUNTIME` = `dotnet`)
- Version `1.0.0` (nuget)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.