Skip to content

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Jul 23, 2024

Backport of #56827 to release/9.0-preview7

/cc @captainsafia

Make ApiExplorer for minimal APIs trim-compatible

This PR introduces new API and behavior modifications to support making the entire OpenAPI pipeline for minimal APIs in ASP.NET Core trimming and native AoT-compatible.

Description

Changes introduced in this PR include:

  • Introduction of IParameterBindingMetadata API
  • Updates to RequestDelegateGenerator and RequestDelegateFactory to support emitting IParameterBindingMetadata for each endpoint
  • Updates to RequestDelegateGenerator and RequestDelegateFactory to support emitting response metadata for handlers that return awaitable responses
  • Updates to ApiExplorer for minimal APIs to support consuming IParameterBindingMetadata and response metadata
  • Updates to ModelMetadata in MVC abstractions to support trim and AoT-compatability

Fixes #56023

Customer Impact

Native AoT support is a differentiation for built-in OpenAPI support and allows us to continue our commitment to make new features for minimal API native AoT-compatible by default.

Regression?

  • Yes
  • No

Risk

  • High
  • Medium
  • Low

This changeset carries medium risk, so we'd like to merge it into preview.7 to identify any potential issues related with the changes including:

  • Changes in the API Explorer-layer with regard to how parameter binding metadata is resolved
  • Changes in the code generation layer for minimal APIs when publishing with and without AoT
  • Changes in MVC's abstractions layer to make dependent types trim and AoT-compatible

Verification

  • Manual (required)
  • Automated

Packaging changes reviewed?

  • Yes
  • No
  • N/A

@ghost ghost added the area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework label Jul 23, 2024
@captainsafia captainsafia added the Servicing-consider Shiproom approval is required for the issue label Jul 23, 2024
@wtgodbe wtgodbe added Servicing-approved Shiproom has approved the issue and removed Servicing-consider Shiproom approval is required for the issue labels Jul 23, 2024
@wtgodbe wtgodbe enabled auto-merge (squash) July 23, 2024 22:16
@wtgodbe wtgodbe merged commit b64de7a into release/9.0-preview7 Jul 23, 2024
@wtgodbe wtgodbe deleted the backport/pr-56827-to-release/9.0-preview7 branch July 23, 2024 23:22
@dotnet-policy-service dotnet-policy-service bot added this to the 9.0-preview7 milestone Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework Servicing-approved Shiproom has approved the issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants