Skip to content

feat: Surface generated OpenAPI document paths via MSBuild Message#66084

Open
selcukgural wants to merge 4 commits intodotnet:mainfrom
selcukgural:fix/terminal-logger-apidescription-output
Open

feat: Surface generated OpenAPI document paths via MSBuild Message#66084
selcukgural wants to merge 4 commits intodotnet:mainfrom
selcukgural:fix/terminal-logger-apidescription-output

Conversation

@selcukgural
Copy link
Copy Markdown

Problem: GenerateOpenApiDocuments target output is suppressed by Terminal Logger (introduced in .NET 8) because it relies on stdout.

Fix: After the exec completes, read generated document paths from the cache file and surface them via so all loggers can surface the output.

Note: Full visibility at default Terminal Logger verbosity depends on dotnet/msbuild#10416.

Fixes #62273

Previously, the GetDocument tool's output was only available via
<Exec> stdout, which Terminal Logger suppresses at default verbosity.

 After the exec completes, read the generated document paths from the cache file and emit them as a high-importance MSBuild <Message>. This surfaces the output through MSBuild's message infrastructure, making it visible to all loggers that respect MessageImportance.High.

 Visibility in Terminal Logger at default verbosity depends on
 dotnet/msbuild#10416 being resolved.

 Fixes dotnet#62273
Copilot AI review requested due to automatic review settings April 1, 2026 13:21
@github-actions github-actions bot added the area-commandlinetools Includes: Command line tools, dotnet-dev-certs, dotnet-user-jwts, and OpenAPI label Apr 1, 2026
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Apr 1, 2026
@dotnet-policy-service
Copy link
Copy Markdown
Contributor

Thanks for your PR, @@selcukgural. Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves build-time visibility for OpenAPI document generation by emitting the generated OpenAPI document file paths via Message Importance="high" (instead of relying on <Exec> stdout, which can be suppressed by the default .NET Terminal Logger).

Changes:

  • After dotnet-getdocument runs, read the generated document paths from the cache file.
  • Emit each generated document path using high-importance MSBuild messages so it shows up across MSBuild loggers (including Terminal Logger).

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

Labels

area-commandlinetools Includes: Command line tools, dotnet-dev-certs, dotnet-user-jwts, and OpenAPI community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Microsoft.Extensions.ApiDescription.Server - Surface Invocation with new TerminalLogger

2 participants