Azure / Azure/azure-functions-openapi-extension

Error when rendering the Swagger UI when API includes a class that has multiple objects(16)

Open
#661 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
388
Forks
202
PR merge metrics
No merged PRs in 30d

Description

**Describe the issue**
I'm getting an exception trying to render the Swagger Document when my API includes a class that has multiple objects(16)

OpenApiResponseWithBody(HttpStatusCode.OK, "application/json", typeof()

**To Reproduce**
Steps to reproduce the behavior:
1. Use Visual Studio to create a new Azure Functions app with Open API Support
2. Add a "Dto" class with many objects (16)
3. try to run the Swagger UI
4. See error

**Expected behavior**
I expect it not to throw an error and render the swagger ui

**Screenshots**
![image](https://github.com/Azure/azure-functions-openapi-extension/assets/52787428/27fdfd14-6d32-4cf7-b088-06ccd099d3d7)

**Environment (please complete the following information, if applicable):**
- OS: Windows 11
- Edge
- Version 126.0.2592.81

**Additional context**
Add any other context about the problem here.

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure in an Azure Functions app with Open API Support using a DTO with many objects, then inspect the exception raised while opening Swagger UI. Use the OpenApiResponseWithBody(..., typeof()) response as the entry point; done means the Swagger UI renders without an exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, openapi
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.