Skip to content

Placeholder resolver is not compliant with .net10 changes #1659

@jvmlet

Description

@jvmlet

Describe the bug

.net10 supports setting null and empty string values in json configuration provider.
Placeholder resolver breaks it.

Steps to reproduce

Steps to reproduce the behavior:

 var opt = new ConfigurationBuilder()
            .AddJsonFile("appsettings.json")
            //.AddPlaceholderResolver()  // uncomment this line and test fails
            .Build()
            .GetSection("Kestrel")
            .Get<KestrelServerOptions>();
            
 opt.Limits.MaxResponseBufferSize.Should().BeNull();
"Kestrel": {
    "Limits": {
      "MaxResponseBufferSize": null
    }
  }

Expected behavior

Same behavior as without the placeholder resolver.

Environment

  • Steeltoe Version 4.1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions