Skip to content

Commit d6a7f69

Browse files
committed
Add missing CDATA sections to code fragments
1 parent 6b69ed3 commit d6a7f69

File tree

6 files changed

+14
-13
lines changed

6 files changed

+14
-13
lines changed

src/JsonApiDotNetCore.Annotations/Resources/Annotations/AttrAttribute.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ public sealed class AttrAttribute : ResourceFieldAttribute
1818
/// is used.
1919
/// </summary>
2020
/// <example>
21-
/// <code>
21+
/// <code><![CDATA[
2222
/// public class Author : Identifiable
2323
/// {
2424
/// [Attr(Capabilities = AttrCapabilities.AllowFilter | AttrCapabilities.AllowSort)]
2525
/// public string Name { get; set; }
2626
/// }
27-
/// </code>
27+
/// ]]></code>
2828
/// </example>
2929
public AttrCapabilities Capabilities
3030
{

src/JsonApiDotNetCore.SourceGenerators/TypeWithAttributeSyntaxReceiver.cs

+1-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ namespace JsonApiDotNetCore.SourceGenerators;
2222
///
2323
/// [AlternateTypeName]
2424
/// public class ExampleResource4 : Identifiable<int> { }
25-
/// ]]>
26-
/// </code>
25+
/// ]]></code>
2726
/// </summary>
2827
internal sealed class TypeWithAttributeSyntaxReceiver : ISyntaxReceiver
2928
{

src/JsonApiDotNetCore/Configuration/IJsonApiOptions.cs

+7-5
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ public interface IJsonApiOptions
1414
/// The URL prefix to use for exposed endpoints.
1515
/// </summary>
1616
/// <example>
17-
/// <code>options.Namespace = "api/v1";</code>
17+
/// <code><![CDATA[
18+
/// options.Namespace = "api/v1";
19+
/// ]]></code>
1820
/// </example>
1921
string? Namespace { get; }
2022

@@ -42,10 +44,10 @@ public interface IJsonApiOptions
4244
/// Use relative links for all resources. False by default.
4345
/// </summary>
4446
/// <example>
45-
/// <code>
47+
/// <code><![CDATA[
4648
/// options.UseRelativeLinks = true;
47-
/// </code>
48-
/// <code>
49+
/// ]]></code>
50+
/// <code><![CDATA[
4951
/// {
5052
/// "type": "articles",
5153
/// "id": "4309",
@@ -58,7 +60,7 @@ public interface IJsonApiOptions
5860
/// }
5961
/// }
6062
/// }
61-
/// </code>
63+
/// ]]></code>
6264
/// </example>
6365
bool UseRelativeLinks { get; }
6466

src/JsonApiDotNetCore/Configuration/TypeLocator.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,9 @@ public IReadOnlyCollection<Type> GetDerivedTypesForUnboundType(Assembly assembly
147147
/// The inherited type.
148148
/// </param>
149149
/// <example>
150-
/// <code>
150+
/// <code><![CDATA[
151151
/// GetDerivedTypes(assembly, typeof(DbContext))
152-
/// </code>
152+
/// ]]></code>
153153
/// </example>
154154
public IEnumerable<Type> GetDerivedTypes(Assembly assembly, Type baseType)
155155
{

src/JsonApiDotNetCore/Serialization/JsonConverters/WriteOnlyDocumentConverter.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public override Document Read(ref Utf8JsonReader reader, Type typeToConvert, Jso
2525
}
2626

2727
/// <summary>
28-
/// Conditionally writes <code>"data": null</code> or omits it, depending on <see cref="SingleOrManyData{TObject}.IsAssigned" />.
28+
/// Conditionally writes <code><![CDATA["data": null]]></code> or omits it, depending on <see cref="SingleOrManyData{TObject}.IsAssigned" />.
2929
/// </summary>
3030
public override void Write(Utf8JsonWriter writer, Document value, JsonSerializerOptions options)
3131
{

src/JsonApiDotNetCore/Serialization/JsonConverters/WriteOnlyRelationshipObjectConverter.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public override RelationshipObject Read(ref Utf8JsonReader reader, Type typeToCo
2020
}
2121

2222
/// <summary>
23-
/// Conditionally writes <code>"data": null</code> or omits it, depending on <see cref="SingleOrManyData{TObject}.IsAssigned" />.
23+
/// Conditionally writes <code><![CDATA["data": null]]></code> or omits it, depending on <see cref="SingleOrManyData{TObject}.IsAssigned" />.
2424
/// </summary>
2525
public override void Write(Utf8JsonWriter writer, RelationshipObject value, JsonSerializerOptions options)
2626
{

0 commit comments

Comments
 (0)