Skip to content

Commit 8b12194

Browse files
committed
More fixes in spelling/grammar
1 parent 0731f46 commit 8b12194

7 files changed

Lines changed: 11 additions & 11 deletions

File tree

docs/usage/common-pitfalls.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,13 @@ the richness of JSON:API. For example, it enables users to include related resou
7373
As an API developer, you'll benefit from rich input validation and fine-grained control for setting what's permitted when users access relationships.
7474

7575
#### Model relationships instead of complex (JSON) attributes
76-
Similar to the above, returning a complex object takes away all the relationship features of JSON:API. Users can't filter inside a complex object. Or update
77-
a nested value, without risking accidentally overwriting another unrelated nested value from a concurrent request. Basically, there's no partial PATCH to prevent that.
76+
Similar to the above, returning a complex object takes away all the relationship features of JSON:API. Users can't filter inside a complex object, nor update
77+
a nested value without risking accidentally overwriting another unrelated nested value from a concurrent request because there's no partial PATCH to prevent that.
7878

7979
#### Stay away from stored procedures
8080
There are [many reasons](https://stackoverflow.com/questions/1761601/is-the-usage-of-stored-procedures-a-bad-practice/9483781#9483781) to not use stored procedures.
8181
But with JSON:API, there's an additional concern. Due to its dynamic nature of filtering, sorting, pagination, sparse fieldsets, and including related resources,
82-
the number of required stored procedures to support all that either explodes, or you'll end up with one extremely complex stored proceduce to handle it all.
82+
the number of required stored procedures to support all that either explodes, or you'll end up with one extremely complex stored procedure to handle it all.
8383
With stored procedures, you're either going to have a lot of work to do, or you'll end up with an API that has very limited capabilities.
8484
Neither sounds very compelling. If stored procedures is what you need, you're better off creating an RPC-style API that doesn't use JsonApiDotNetCore.
8585

docs/usage/errors.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Errors returned will contain only the properties that are set on the `ErrorObject` class. Custom fields can be added through `ErrorObject.Meta`.
44
You can create a custom error by throwing a `JsonApiException` (which accepts an `ErrorObject` instance), or returning an `ErrorObject` instance from an `ActionResult` in a controller.
5-
Please keep in mind that JSON:API requires `Title` to be a generic message, while `Detail` should contain information about the specific problem occurence.
5+
Please keep in mind that JSON:API requires `Title` to be a generic message, while `Detail` should contain information about the specific problem occurrence.
66

77
From a controller method:
88

docs/usage/extensibility/query-strings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ See [here](~/usage/extensibility/resource-definitions.md#custom-query-string-par
2121

2222
## Custom query string parsing
2323

24-
In order to add parsing of custom query string parameters, you can implement the `IQueryStringParameterReader` interface and register your reader.
24+
To add parsing of custom query string parameters, implement the `IQueryStringParameterReader` interface and register your reader.
2525

2626
```c#
2727
public class CustomQueryStringParameterReader : IQueryStringParameterReader

docs/usage/extensibility/services.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ IResourceCommandService <|-- ISetRelationshipService
111111
IResourceCommandService <|-- IRemoveFromRelationshipService
112112
```
113113

114-
In order to take advantage of these interfaces you first need to register the service for each implemented interface.
114+
To take advantage of these interfaces, register the service for each implemented interface.
115115

116116
```c#
117117
public class ArticleService : ICreateService<Article, long>, IDeleteService<Article, long>

docs/usage/resources/nullability.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public sealed class Label : Identifiable<long>
6060

6161
When NRT is turned on, use nullability annotations (?) on attributes and relationships. This makes Entity Framework Core generate non-nullable columns. And model errors are returned when non-nullable fields are omitted.
6262

63-
The [Entity Framework Core guide on NRT](https://learn.microsoft.com/ef/core/miscellaneous/nullable-reference-types) recommends to use constructor binding to initialize non-nullable properties, but JsonApiDotNetCore does not support that. For required navigation properties, it suggests to use a non-nullable property with a nullable backing field. JsonApiDotNetCore does not support that either. In both cases, just use the null-forgiving operator (!).
63+
The [Entity Framework Core guide on NRT](https://learn.microsoft.com/ef/core/miscellaneous/nullable-reference-types) recommends using constructor binding to initialize non-nullable properties, but JsonApiDotNetCore does not support that. For required navigation properties, it suggests using a non-nullable property with a nullable backing field. JsonApiDotNetCore does not support that either. In both cases, use the null-forgiving operator (!).
6464

6565
When ModelState validation is turned on, to-many relationships must be assigned an empty collection. Otherwise an error is returned when they don't occur in the request body.
6666

src/Examples/DapperExample/FromEntitiesNavigationResolver.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public FromEntitiesNavigationResolver(IResourceGraph resourceGraph, FromEntities
3232

3333
public void Resolve()
3434
{
35-
// In order to produce SQL, some knowledge of the underlying database model is required.
35+
// To produce SQL, some knowledge of the underlying database model is required.
3636
// Because the database in this example project is created using Entity Framework Core, we derive that information from its model.
3737
// Some alternative approaches to consider:
3838
// - Query the database to obtain model information at startup.

src/JsonApiDotNetCore/Middleware/IAsyncConvertEmptyActionResultFilter.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@ namespace JsonApiDotNetCore.Middleware;
77
/// Converts action result without parameters into action result with null parameter.
88
/// </summary>
99
/// <remarks>
10-
/// This basically turns calls such as
10+
/// This converts calls such as:
1111
/// <c>
1212
/// return NotFound()
1313
/// </c>
14-
/// into
14+
/// into:
1515
/// <c>
1616
/// return NotFound(null)
1717
/// </c>
1818
/// , so that our formatter is invoked, where we'll build a JSON:API compliant response. For details, see:
19-
/// https://github.com/dotnet/aspnetcore/issues/16969
19+
/// https://github.com/dotnet/aspnetcore/issues/16969.
2020
/// </remarks>
2121
[PublicAPI]
2222
public interface IAsyncConvertEmptyActionResultFilter : IAsyncAlwaysRunResultFilter;

0 commit comments

Comments
 (0)