diff --git a/src/Umbraco.Cms.Api.Delivery/Configuration/ConfigureUmbracoMemberAuthenticationDeliveryApiSwaggerGenOptions.cs b/src/Umbraco.Cms.Api.Delivery/Configuration/ConfigureUmbracoMemberAuthenticationDeliveryApiSwaggerGenOptions.cs index 5922768462..4ba3031a85 100644 --- a/src/Umbraco.Cms.Api.Delivery/Configuration/ConfigureUmbracoMemberAuthenticationDeliveryApiSwaggerGenOptions.cs +++ b/src/Umbraco.Cms.Api.Delivery/Configuration/ConfigureUmbracoMemberAuthenticationDeliveryApiSwaggerGenOptions.cs @@ -47,9 +47,7 @@ public class ConfigureUmbracoMemberAuthenticationDeliveryApiSwaggerGenOptions : return; } - swaggerDoc.Components ??= new OpenApiComponents(); - swaggerDoc.Components.SecuritySchemes ??= new Dictionary(); - swaggerDoc.Components.SecuritySchemes.Add( + swaggerDoc.AddComponent( AuthSchemeName, new OpenApiSecurityScheme { diff --git a/src/Umbraco.Cms.Api.Management/DependencyInjection/WebhooksBuilderExtensions.cs b/src/Umbraco.Cms.Api.Management/DependencyInjection/WebhooksBuilderExtensions.cs index 81d764f697..fa3bcdb71a 100644 --- a/src/Umbraco.Cms.Api.Management/DependencyInjection/WebhooksBuilderExtensions.cs +++ b/src/Umbraco.Cms.Api.Management/DependencyInjection/WebhooksBuilderExtensions.cs @@ -1,4 +1,4 @@ -using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.DependencyInjection.Extensions; using Umbraco.Cms.Api.Common.Accessors; using Umbraco.Cms.Api.Common.Rendering; using Umbraco.Cms.Api.Management.Factories; @@ -16,9 +16,10 @@ internal static class WebhooksBuilderExtensions builder.Services.AddUnique(); builder.AddMapDefinition(); - // deliveryApi will overwrite these more basic ones. - builder.Services.AddScoped(); - builder.Services.AddSingleton(); + // We have to use TryAdd here, as if they are registered by the delivery API, we don't want to register them + // Delivery API will also overwrite these IF it is enabled. + builder.Services.TryAddScoped(); + builder.Services.TryAddSingleton(); return builder; } diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs index 600ce902a2..3dc5f2e7a5 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs @@ -141,8 +141,8 @@ public class UmbracoPlan : MigrationPlan To("{8B2C830A-4FFB-4433-8337-8649B0BF52C8}"); To("{1C38D589-26BB-4A46-9ABE-E4A0DF548A87}"); - // To 17.1.0 - To("{BE5CA411-E12D-4455-A59E-F12A669E5363}"); + // To 17.0.1 + To("{BE5CA411-E12D-4455-A59E-F12A669E5363}"); // To 18.0.0 // TODO (V18): Enable on 18 branch diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_17_1_0/EnsureUmbracoPropertyDataColumnCasing.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_17_0_1/EnsureUmbracoPropertyDataColumnCasing.cs similarity index 90% rename from src/Umbraco.Infrastructure/Migrations/Upgrade/V_17_1_0/EnsureUmbracoPropertyDataColumnCasing.cs rename to src/Umbraco.Infrastructure/Migrations/Upgrade/V_17_0_1/EnsureUmbracoPropertyDataColumnCasing.cs index 9aba6acd1f..6c97c075dd 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_17_1_0/EnsureUmbracoPropertyDataColumnCasing.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_17_0_1/EnsureUmbracoPropertyDataColumnCasing.cs @@ -1,18 +1,15 @@ using Microsoft.Extensions.Logging; using NPoco; -using Umbraco.Cms.Core; -using Umbraco.Cms.Core.Models.Membership; -using Umbraco.Cms.Infrastructure.Persistence; using static Umbraco.Cms.Core.Constants; using ColumnInfo = Umbraco.Cms.Infrastructure.Persistence.SqlSyntax.ColumnInfo; -namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_17_1_0; +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_17_0_1; /// /// Ensures the propertyTypeId column in umbracoPropertyData has correct camel case naming. /// /// -/// SQL Server is case sensitive for columns used in a SQL Bulk insert statement(which is used in publishing +/// SQL Server is case sensitive for columns used in a SQL Bulk insert statement (which is used in publishing /// operations on umbracoPropertyData). /// Earlier versions of Umbraco used all lower case for the propertyTypeId column name (propertytypeid), whereas newer versions /// use camel case (propertyTypeId). diff --git a/src/Umbraco.PublishedCache.HybridCache/PublishedProperty.cs b/src/Umbraco.PublishedCache.HybridCache/PublishedProperty.cs index 0ba4b6873b..17f3716630 100644 --- a/src/Umbraco.PublishedCache.HybridCache/PublishedProperty.cs +++ b/src/Umbraco.PublishedCache.HybridCache/PublishedProperty.cs @@ -187,10 +187,10 @@ internal sealed class PublishedProperty : PublishedPropertyBase switch (cacheLevel) { case PropertyCacheLevel.None: + case PropertyCacheLevel.Snapshot: // Snapshot is obsolete, so for now treat as None // never cache anything cacheValues = new CacheValues(); break; - case PropertyCacheLevel.Snapshot: // Snapshot is obsolete, so for now treat as element case PropertyCacheLevel.Element: // cache within the property object itself, ie within the content object cacheValues = _cacheValues ??= new CacheValues();