Skip to content

[release/6.0-preview6] Don't add service parameters to an endpoint ApiDescriptions #33728

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Jun 21, 2021

Backport of #33727 to release/6.0-preview6

Before:

image

After:

image

/cc @halter73

Customer Impact

Service parameters (those that are resolved from the RequestServices IServiceProvider) for minimal actions show up in the swagger.json and UI as a schema even though there should be none as the parameter in no way comes from the request.

Testing

I tested this manually with Swashbuckle.AspNetCore 5.6.3 from NuGet and verified the service schema no longer shows up in swagger.json or the UI. I also updated the unit tests to verify nothing is added to the API metadata for parameters that come from the

Risk

Low. This can only affect applications that call the new AddEndpointsApiExplorer() API added in preview6.

@ghost ghost added the area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates label Jun 21, 2021
@halter73 halter73 added this to the 6.0-preview6 milestone Jun 21, 2021
@halter73
Copy link
Member

halter73 commented Jun 22, 2021

Test failure was unrelated: #33733

@azure-pipelines
Copy link

Command 'run

Test' is not supported by Azure Pipelines.



Supported commands

  • help:
    • Get descriptions, examples and documentation about supported commands
    • Example: help "command_name"
  • list:
    • List all pipelines for this repository using a comment.
    • Example: "list"
  • run:
    • Run all pipelines or specific pipelines for this repository using a comment. Use this command by itself to trigger all related pipelines, or specify specific pipelines to run.
    • Example: "run" or "run pipeline_name, pipeline_name, pipeline_name"
  • where:
    • Report back the Azure DevOps orgs that are related to this repository and org
    • Example: "where"

See additional documentation.

@halter73
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@halter73
Copy link
Member

@dotnet/aspnet-build This has been approved. Can someone please merge?

@wtgodbe wtgodbe merged commit c4e8af6 into release/6.0-preview6 Jun 22, 2021
@wtgodbe wtgodbe deleted the backport/pr-33727-to-release/6.0-preview6 branch June 22, 2021 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants