Skip to content

[OpenApi] SchemaTransformer Bug #62893

@luoxing66

Description

@luoxing66

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

When you modify "ParameterDescription.Name" using the Schema converter, you must refresh it once when you start the project for it to take effect.

options.AddSchemaTransformer((schema, context, cancellationToken) => { if (context.ParameterDescription?.Source.Id == "Query" && !string.IsNullOrEmpty(context.ParameterDescription.Name)) { context.ParameterDescription.Name = context.ParameterDescription.Name.ToLower(); } return Task.CompletedTask; });

Expected Behavior

It should be displayed in lower case when it is first launched.

Steps To Reproduce

No response

Exceptions (if any)

First Startup
Image
After Refresh

Image

.NET Version

10.0.0-preview.5.25277.114

Anything else?

.NET SDK:
Version: 10.0.100-preview.5.25277.114
Commit: ddf39a1b46
Workload version: 10.0.100-manifests.35d2efbf
MSBuild version: 17.15.0-preview-25277-114+ddf39a1b4

运行时环境:
OS Name: Mac OS X
OS Version: 15.5
OS Platform: Darwin
RID: osx-arm64
Base Path: /usr/local/share/dotnet/sdk/10.0.100-preview.5.25277.114/

已安装 .NET 工作负载:
There are no installed workloads to display.
Configured to use workload sets when installing new manifests.
Workloads are configured to install and update using workload versions, but none were found. Run "dotnet workload restore" to install a workload version.

Host:
Version: 10.0.0-preview.5.25277.114
Architecture: arm64
Commit: ddf39a1b46

.NET SDKs installed:
9.0.300 [/usr/local/share/dotnet/sdk]
10.0.100-preview.5.25277.114 [/usr/local/share/dotnet/sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 9.0.5 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 10.0.0-preview.5.25277.114 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 9.0.5 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 10.0.0-preview.5.25277.114 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
None

Environment variables:
Not set

global.json file:
Not found

Learn more:
https://aka.ms/dotnet/info

Download .NET:
https://aka.ms/dotnet/download

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs: Attention 👋This issue needs the attention of a contributor, typically because the OP has provided an update.Needs: ReproIndicates that the team needs a repro project to continue the investigation on this issuearea-minimalIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcfeature-openapi

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions