diff --git a/src/JsonApiDotNetCore/Middleware/HeaderConstants.cs b/src/JsonApiDotNetCore/Middleware/HeaderConstants.cs index 190efb74f..05ddc69a6 100644 --- a/src/JsonApiDotNetCore/Middleware/HeaderConstants.cs +++ b/src/JsonApiDotNetCore/Middleware/HeaderConstants.cs @@ -14,5 +14,5 @@ public static class HeaderConstants public const string AtomicOperationsMediaType = $"{MediaType}; ext=\"https://jsonapi.org/ext/atomic\""; [Obsolete($"Use {nameof(JsonApiMediaType)}.{nameof(JsonApiMediaType.RelaxedAtomicOperations)}.ToString() instead.")] - public const string RelaxedAtomicOperationsMediaType = $"{MediaType}; ext=atomic-operations"; + public const string RelaxedAtomicOperationsMediaType = $"{MediaType}; ext=atomic"; } diff --git a/src/JsonApiDotNetCore/Middleware/JsonApiMediaType.cs b/src/JsonApiDotNetCore/Middleware/JsonApiMediaType.cs index d9661abff..cfb2cb8b0 100644 --- a/src/JsonApiDotNetCore/Middleware/JsonApiMediaType.cs +++ b/src/JsonApiDotNetCore/Middleware/JsonApiMediaType.cs @@ -25,7 +25,7 @@ public sealed class JsonApiMediaType : IEquatable public static readonly JsonApiMediaType AtomicOperations = new([JsonApiMediaTypeExtension.AtomicOperations]); /// - /// Gets the JSON:API media type with the "atomic-operations" extension. + /// Gets the JSON:API media type with the "atomic" extension. /// public static readonly JsonApiMediaType RelaxedAtomicOperations = new([JsonApiMediaTypeExtension.RelaxedAtomicOperations]); diff --git a/src/JsonApiDotNetCore/Middleware/JsonApiMediaTypeExtension.cs b/src/JsonApiDotNetCore/Middleware/JsonApiMediaTypeExtension.cs index f35a613dc..6ee7ac10c 100644 --- a/src/JsonApiDotNetCore/Middleware/JsonApiMediaTypeExtension.cs +++ b/src/JsonApiDotNetCore/Middleware/JsonApiMediaTypeExtension.cs @@ -9,7 +9,7 @@ namespace JsonApiDotNetCore.Middleware; public sealed class JsonApiMediaTypeExtension : IEquatable { public static readonly JsonApiMediaTypeExtension AtomicOperations = new("https://jsonapi.org/ext/atomic"); - public static readonly JsonApiMediaTypeExtension RelaxedAtomicOperations = new("atomic-operations"); + public static readonly JsonApiMediaTypeExtension RelaxedAtomicOperations = new("atomic"); public string UnescapedValue { get; } diff --git a/test/JsonApiDotNetCoreTests/IntegrationTests/ContentNegotiation/AcceptHeaderTests.cs b/test/JsonApiDotNetCoreTests/IntegrationTests/ContentNegotiation/AcceptHeaderTests.cs index b1f92ffd9..6927e811c 100644 --- a/test/JsonApiDotNetCoreTests/IntegrationTests/ContentNegotiation/AcceptHeaderTests.cs +++ b/test/JsonApiDotNetCoreTests/IntegrationTests/ContentNegotiation/AcceptHeaderTests.cs @@ -121,7 +121,7 @@ public async Task Prefers_JsonApi_with_AtomicOperations_extension_in_Accept_head headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse($"{JsonApiMediaType.Default}; profile=some")); headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse(JsonApiMediaType.Default.ToString())); headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse($"{JsonApiMediaType.Default}; unknown=unexpected")); - headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse($"{JsonApiMediaType.Default};EXT=atomic-operations; q=0.8")); + headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse($"{JsonApiMediaType.Default};EXT=atomic; q=0.8")); headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse($"{JsonApiMediaType.Default};EXT=\"https://jsonapi.org/ext/atomic\"; q=0.2")); }; @@ -168,7 +168,7 @@ public async Task Prefers_JsonApi_with_relaxed_AtomicOperations_extension_in_Acc headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse(JsonApiMediaType.Default.ToString())); headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse($"{JsonApiMediaType.Default}; unknown=unexpected")); headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse($"{JsonApiMediaType.Default};EXT=\"https://jsonapi.org/ext/atomic\"; q=0.8")); - headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse($"{JsonApiMediaType.Default};EXT=atomic-operations; q=0.2")); + headers.Accept.Add(MediaTypeWithQualityHeaderValue.Parse($"{JsonApiMediaType.Default};EXT=atomic; q=0.2")); }; // Act