Skip to content

OpenApi__HostNames items does not trimming #411

@kafkaaaa

Description

@kafkaaaa

Describe the issue
Does not trim space in HostNames:Url string at OpenApiDocument(local.setting.json).

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Microsoft.Azure.WebJobs.Extensions.OpenApi.TestApp/local.setting.json'
  2. Scroll down to 'OpenApi__HostNames": "https://contoso.com/api**,** https://fabrikam.com/api'
  3. See error

Expected behavior
In my test method below..

        [TestMethod]
        public void Given_OpenApiDocument_When_Servers_Given_Then_It_Should_Return_Result()
        {
            var servers = this._doc.Servers;
            
            servers.Count.Should().Be(3);
            servers[0].Url.Should().Be("http://localhost:7071/api");
            servers[1].Url.Should().Be("https://contoso.com/api");
            servers[2].Url.Should().Be("https://fabrikam.com/api");
        }

Cannot pass test debugging.

Screenshots
image

Environment (please complete the following information, if applicable):

  • OS: Windows 10 Home
  • Browser: Chrome

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions