Skip to content

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

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

feat: Surface generated OpenAPI document paths via MSBuild Message#66084
selcukgural wants to merge 7 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
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).

@dotnet-policy-service dotnet-policy-service Bot added the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Apr 10, 2026
@selcukgural
Copy link
Copy Markdown
Author

Looks like this PR hasn't been active for some time and the codebase could have been changed in the meantime. To make sure no conflicting changes have occurred, please rerun validation before merging. You can do this by leaving an /azp run comment here (requires commit rights), or by simply closing and reopening.

/azp run

@selcukgural selcukgural reopened this Apr 10, 2026
@dotnet-policy-service dotnet-policy-service Bot added this to the 11.0-preview4 milestone Apr 10, 2026
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 pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants