Open dd43054 opened 5 months ago
I think the problem is, that the BaseUrl property is not used. The logik to replace the "/" is now in the property but the methods use the _baseUrl and not the property.
public string BaseUrl { get { return _baseUrl; } [System.Diagnostics.CodeAnalysis.MemberNotNull(nameof(_baseUrl))] set { _baseUrl = value; if (!string.IsNullOrEmpty(_baseUrl) && !_baseUrl.EndsWith("/")) _baseUrl += '/'; } }
var urlBuilder_ = new System.Text.StringBuilder(); if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); // Operation Path: "api/v1/Controller/Method" urlBuilder_.Append("api/v1/Controller/Method");
I recently upgraded to 14.0.3 (I don't remember from which version) and the runtime from Net50 to Net60. After running the generator, I have all tests failing. After reviewing the generated code, I see that a slash would now be required in the configured base URL. I can modify all my config files, but this is a breaking change.
Older nswag generated code:
Code generated with 14.0.3: