Skip to content

Commit 5c054c1

Browse files
author
Bart Koelman
authored
Fixed spelling errors (#663)
1 parent 2b64e03 commit 5c054c1

File tree

62 files changed

+199
-199
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+199
-199
lines changed

src/Examples/GettingStarted/ResourceDefinitionExample/Model.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ namespace GettingStarted.ResourceDefinitionExample
55
public class Model : Identifiable
66
{
77
[Attr]
8-
public string DontExpose { get; set; }
8+
public string DoNotExpose { get; set; }
99
}
10-
}
10+
}

src/Examples/GettingStarted/ResourceDefinitionExample/ModelDefinition.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public ModelDefinition(IResourceGraph resourceGraph) : base(resourceGraph)
1313
// this might be used if the incoming value gets hashed or
1414
// encrypted prior to being persisted and this value should
1515
// never be sent back to the client
16-
HideFields(model => model.DontExpose);
16+
HideFields(model => model.DoNotExpose);
1717
}
1818
}
1919
}

src/Examples/GettingStarted/Startup.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public void ConfigureServices(IServiceCollection services)
2222

2323
public void Configure(IApplicationBuilder app, SampleDbContext context)
2424
{
25-
context.Database.EnsureDeleted(); // indicies need to be reset
25+
context.Database.EnsureDeleted(); // indices need to be reset
2626
app.UseJsonApi();
2727
}
2828
}

src/JsonApiDotNetCore/Configuration/DefaultAttributeResponseBehavior.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
namespace JsonApiDotNetCore.Configuration
1+
namespace JsonApiDotNetCore.Configuration
22
{
33
/// <summary>
4-
/// Allows default valued attributes to be ommitted from the response payload
4+
/// Allows default valued attributes to be omitted from the response payload
55
/// </summary>
66
public struct DefaultAttributeResponseBehavior
77
{
88

99
/// <param name="omitNullValuedAttributes">Do not serialize default value attributes</param>
1010
/// <param name="allowClientOverride">
11-
/// Allow clients to override the serialization behavior through a query parmeter.
11+
/// Allow clients to override the serialization behavior through a query parameter.
1212
/// <example>
1313
/// ```
1414
/// GET /articles?omitDefaultValuedAttributes=true

src/JsonApiDotNetCore/Configuration/ILinksConfiguration.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using JsonApiDotNetCore.Models.Links;
1+
using JsonApiDotNetCore.Models.Links;
22

33
namespace JsonApiDotNetCore.Configuration
44
{
@@ -33,20 +33,20 @@ public interface ILinksConfiguration
3333
/// <summary>
3434
/// Configures globally which links to show in the <see cref="TopLevelLinks"/>
3535
/// object for a requested resource. Setting can be overriden per resource by
36-
/// adding a <see cref="LinksAttribute"/> to the class definitio of that resource.
36+
/// adding a <see cref="LinksAttribute"/> to the class definition of that resource.
3737
/// </summary>
3838
Link TopLevelLinks { get; }
3939

4040
/// <summary>
4141
/// Configures globally which links to show in the <see cref="ResourceLinks"/>
4242
/// object for a requested resource. Setting can be overriden per resource by
43-
/// adding a <see cref="LinksAttribute"/> to the class definitio of that resource.
43+
/// adding a <see cref="LinksAttribute"/> to the class definition of that resource.
4444
/// </summary>
4545
Link ResourceLinks { get; }
4646
/// <summary>
4747
/// Configures globally which links to show in the <see cref="RelationshipLinks"/>
4848
/// object for a requested resource. Setting can be overriden per resource by
49-
/// adding a <see cref="LinksAttribute"/> to the class definitio of that resource.
49+
/// adding a <see cref="LinksAttribute"/> to the class definition of that resource.
5050
/// Option can also be specified per relationship by using the associated links argument
5151
/// in the constructor of <see cref="RelationshipAttribute"/>.
5252
/// </summary>
@@ -68,4 +68,4 @@ public interface ILinksConfiguration
6868
Link RelationshipLinks { get; }
6969

7070
}
71-
}
71+
}

src/JsonApiDotNetCore/Configuration/JsonApiOptions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public class JsonApiOptions : IJsonApiOptions
8383
/// <summary>
8484
/// Whether or not clients can provide ids when creating resources.
8585
/// Defaults to false. When disabled the application will respond
86-
/// with a 403 Forbidden respponse if a client attempts to create a
86+
/// with a 403 Forbidden response if a client attempts to create a
8787
/// resource with a defined id.
8888
/// </summary>
8989
/// <example>

src/JsonApiDotNetCore/Configuration/NullAttributeResponseBehavior.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
namespace JsonApiDotNetCore.Configuration
22
{
33
/// <summary>
4-
/// Allows null attributes to be ommitted from the response payload
4+
/// Allows null attributes to be omitted from the response payload
55
/// </summary>
66
public struct NullAttributeResponseBehavior
77
{
88
/// <param name="omitNullValuedAttributes">Do not serialize null attributes</param>
99
/// <param name="allowClientOverride">
10-
/// Allow clients to override the serialization behavior through a query parmeter.
10+
/// Allow clients to override the serialization behavior through a query parameter.
1111
/// <example>
1212
/// ```
1313
/// GET /articles?omitNullValuedAttributes=true

src/JsonApiDotNetCore/Data/DefaultResourceRepository.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ private bool IsHasOneRelationship(string internalRelationshipName, Type type)
147147
return false;
148148
}
149149
// relationshipAttr is null when we don't put a [RelationshipAttribute] on the inverse navigation property.
150-
// In this case we use relfection to figure out what kind of relationship is pointing back.
150+
// In this case we use reflection to figure out what kind of relationship is pointing back.
151151
return !type.GetProperty(internalRelationshipName).PropertyType.Inherits(typeof(IEnumerable));
152152
}
153153

@@ -359,12 +359,12 @@ public async Task<IReadOnlyList<TResource>> ToListAsync(IQueryable<TResource> en
359359

360360
/// <summary>
361361
/// Before assigning new relationship values (UpdateAsync), we need to
362-
/// attach the current database values of the relationship to the dbcontext, else
362+
/// attach the current database values of the relationship to the dbContext, else
363363
/// it will not perform a complete-replace which is required for
364364
/// one-to-many and many-to-many.
365365
/// <para />
366-
/// For example: a person `p1` has 2 todoitems: `t1` and `t2`.
367-
/// If we want to update this todoitem set to `t3` and `t4`, simply assigning
366+
/// For example: a person `p1` has 2 todo-items: `t1` and `t2`.
367+
/// If we want to update this todo-item set to `t3` and `t4`, simply assigning
368368
/// `p1.todoItems = [t3, t4]` will result in EF Core adding them to the set,
369369
/// resulting in `[t1 ... t4]`. Instead, we should first include `[t1, t2]`,
370370
/// after which the reassignment `p1.todoItems = [t3, t4]` will actually
@@ -383,7 +383,7 @@ protected void LoadCurrentRelationships(TResource oldEntity, RelationshipAttribu
383383
}
384384

385385
/// <summary>
386-
/// Given a iidentifiable relationshipvalue, verify if an entity of the underlying
386+
/// Given a IIdentifiable relationship value, verify if an entity of the underlying
387387
/// type with the same ID is already attached to the dbContext, and if so, return it.
388388
/// If not, attach the relationship value to the dbContext.
389389
///

src/JsonApiDotNetCore/Extensions/IServiceCollectionExtensions.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public static IServiceCollection AddResourceService<T>(this IServiceCollection s
7676
{
7777
foreach (var openGenericType in ServiceDiscoveryFacade.ServiceInterfaces)
7878
{
79-
// A shorthand interface is one where the id type is ommitted
79+
// A shorthand interface is one where the id type is omitted
8080
// e.g. IResourceService<T> is the shorthand for IResourceService<T, TId>
8181
var isShorthandInterface = (openGenericType.GetTypeInfo().GenericTypeParameters.Length == 1);
8282
if (isShorthandInterface && resourceDescriptor.IdType != typeof(int))
@@ -102,7 +102,7 @@ public static IServiceCollection AddResourceService<T>(this IServiceCollection s
102102

103103
private static HashSet<ResourceDescriptor> GetResourceTypesFromServiceImplementation(Type type)
104104
{
105-
var resourceDecriptors = new HashSet<ResourceDescriptor>();
105+
var resourceDescriptors = new HashSet<ResourceDescriptor>();
106106
var interfaces = type.GetInterfaces();
107107
foreach (var i in interfaces)
108108
{
@@ -111,11 +111,11 @@ private static HashSet<ResourceDescriptor> GetResourceTypesFromServiceImplementa
111111
var firstGenericArgument = i.GenericTypeArguments.FirstOrDefault();
112112
if (TypeLocator.TryGetResourceDescriptor(firstGenericArgument, out var resourceDescriptor) == true)
113113
{
114-
resourceDecriptors.Add(resourceDescriptor);
114+
resourceDescriptors.Add(resourceDescriptor);
115115
}
116116
}
117117
}
118-
return resourceDecriptors;
118+
return resourceDescriptors;
119119
}
120120
}
121121
}

src/JsonApiDotNetCore/Formatters/JsonApiWriter.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ namespace JsonApiDotNetCore.Formatters
1313
/// <summary>
1414
/// Formats the response data used https://docs.microsoft.com/en-us/aspnet/core/web-api/advanced/formatting?view=aspnetcore-3.0.
1515
/// It was intended to have as little dependencies as possible in formatting layer for greater extensibility.
16-
/// It onls depends on <see cref="IJsonApiSerializer"/>.
16+
/// It only depends on <see cref="IJsonApiSerializer"/>.
1717
/// </summary>
1818
public class JsonApiWriter : IJsonApiWriter
1919
{
@@ -57,7 +57,7 @@ public async Task WriteAsync(OutputFormatterWriteContext context)
5757
}
5858
catch (Exception e)
5959
{
60-
_logger?.LogError(new EventId(), e, "An error ocurred while formatting the response");
60+
_logger?.LogError(new EventId(), e, "An error occurred while formatting the response");
6161
var errors = new ErrorCollection();
6262
errors.Add(new Error(500, e.Message, ErrorMeta.FromException(e)));
6363
responseContent = _serializer.Serialize(errors);

0 commit comments

Comments
 (0)