Remove UmbracoPath setting (#16037)

* Use require modifier instead of setting null-suppressed default values

* Only remove read-only properties when IgnoreReadOnlyProperties is set

* Obsolete UmbracoPath property and remove work-around for obsolete setter

* Remove UmbracoPath setting and use constant instead

* Remove usage of GetBackOfficePath

* Add IHostingEnvironment.GetBackOfficePath() extension method

* Add Constants.System.UmbracoPathSegment constant

* Update Constants.System XML docs

* Replace StringBuilder with string interpolation

Co-authored-by: Nuklon <Nuklon@users.noreply.github.com>

* Fix syntax error

* Removed uses of obsoletes.

* Further obsolete messages.

* Cleaned up usings.

* Update src/Umbraco.Infrastructure/Install/FilePermissionHelper.cs

Co-authored-by: Ronald Barendse <ronald@barend.se>

---------

Co-authored-by: Nuklon <Nuklon@users.noreply.github.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
This commit is contained in:
Ronald Barendse
2025-03-03 07:38:30 +01:00
committed by GitHub
parent 561d871677
commit 780184e553
35 changed files with 237 additions and 453 deletions

View File

@@ -40,10 +40,10 @@ internal sealed class OpenAPIContractTest : UmbracoTestServerTestBase
public async Task Validate_OpenApi_Contract_is_implemented()
{
string[] keysToIgnore = { "servers", "x-generator" };
var officePath = GlobalSettings.GetBackOfficePath(HostingEnvironment);
var backOfficePath = HostingEnvironment.GetBackOfficePath();
var urlToContract = $"{officePath}/management/api/openapi.json";
var swaggerPath = $"{officePath}/swagger/management/swagger.json";
var urlToContract = $"{backOfficePath}/management/api/openapi.json";
var swaggerPath = $"{backOfficePath}/swagger/management/swagger.json";
var apiContract = JsonNode.Parse(await Client.GetStringAsync(urlToContract)).AsObject();
var generatedJsonString = await Client.GetStringAsync(swaggerPath);