Skip to content

[WIP] Fix bug with empty path objects in OpenAPI documents#2

Closed
Copilot wants to merge 1 commit into
mainfrom
copilot/fix-empty-openapi-paths
Closed

[WIP] Fix bug with empty path objects in OpenAPI documents#2
Copilot wants to merge 1 commit into
mainfrom
copilot/fix-empty-openapi-paths

Conversation

Copilot AI commented Feb 27, 2026

Copy link
Copy Markdown

Cloud agent has begun work on The #file:Program.cs... and will update this pull request as work progresses.

Original prompt

The #file:Program.cs of Minimal Open API Example has a bug that I want to fix.

The bug is that the openapi documents, downloadable at openapi/v1.json (and v2/v3) have an EMPTY path object, and no schemas.

This is odd, because the document itself does work. When you go to openapi/v1.json, the info:version property is set to the correct version.

Even weirder, the #file:Program.cs of Open API Example (Controllers instead of Minimal API) DOES work; when you run the sample you see that the OpenAPI document is filled correctly.

I ASSUME this means that it has something to do with the way that these 2 approaches differ in setting up ASP.Versioning + Microsoft.AspNetCore.OpenAPI integrations, possibly with the API explorer as this is where OpenAPI gets its data from. However, don't laser focus on this assumption!

I want you to create a plan to fix this bug. Requirements:

  • You validate that this bug in fact exists by running Minimal Open API Example and navigating to the openapi/v1.json endpoint. You do the same for the Open API Example (controllers) and validate that that DOES work.
  • This bug is fixed, and openapi/vX.json has paths and schemas
  • Tests are written to prevent this bug happening in the future
  • No changes to the public API or other big regressions, IF POSSIBLE.
  • You investigate the minimal_api_should_generate_expected_open_api_document document, as this should also not have paths but I believe it does. Is this a hint for something deeper? Or am I looking at 2 different things here.

The user has attached the following file paths as relevant context:

  • examples\AspNetCore\WebApi\OpenApiExample\Program.cs
  • examples\AspNetCore\WebApi\MinimalOpenApiExample\Program.cs
  • .github\copilot-instructions.md

Created from VS Code.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants