Azure / Azure/azure-functions-openapi-extension
Error when rendering the Swagger UI when API includes a class that has multiple objects(16)
- 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**

**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
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