Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion benchmarks/Tools/FakeRequestQueryStringAccessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Benchmarks.Tools;

/// <summary>
/// Enables to inject a query string, instead of obtaining it from <see cref="HttpContext" />.
/// Enables injecting a query string, instead of obtaining it from <see cref="HttpContext" />.
/// </summary>
internal sealed class FakeRequestQueryStringAccessor : IRequestQueryStringAccessor
{
Expand Down
2 changes: 1 addition & 1 deletion docs/usage/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ You'll need to build the resource graph on the client and rely on internal imple
Due to auto-generated controllers, you may find it hard to determine where to put your breakpoints.
In Visual Studio, controllers are accessible below **Solution Explorer > Project > Dependencies > Analyzers > JsonApiDotNetCore.SourceGenerators**.

After turning on [Source Link](https://devblogs.microsoft.com/dotnet/improving-debug-time-productivity-with-source-link/#enabling-source-link) (which enables to download the JsonApiDotNetCore source code from GitHub), you can step into our source code and add breakpoints there too.
After turning on [Source Link](https://devblogs.microsoft.com/dotnet/improving-debug-time-productivity-with-source-link/#enabling-source-link) (which enables downloading the JsonApiDotNetCore source code from GitHub), you can step into our source code and add breakpoints there too.

Here are some key places in the execution pipeline to set a breakpoint:
- `JsonApiRoutingConvention.Apply`: Controllers are registered here (executes once at startup)
Expand Down
2 changes: 1 addition & 1 deletion docs/usage/openapi-documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ After [enabling OpenAPI](~/usage/openapi.md), you can expose a documentation web

## SwaggerUI

[SwaggerUI](https://swagger.io/tools/swagger-ui/) enables to visualize and interact with the JSON:API endpoints through a web page.
[SwaggerUI](https://swagger.io/tools/swagger-ui/) enables visualizing and interacting with the JSON:API endpoints through a web page.
While it conveniently provides the ability to execute requests, it doesn't show properties of derived types when component schema inheritance is used.

SwaggerUI can be enabled by installing the `Swashbuckle.AspNetCore.SwaggerUI` NuGet package and adding the following to your `Program.cs` file:
Expand Down
4 changes: 2 additions & 2 deletions docs/usage/openapi.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

# OpenAPI

Exposing an [OpenAPI document](https://swagger.io/specification/) for your JSON:API endpoints enables to provide a
[documentation website](https://swagger.io/tools/swagger-ui/) and to generate typed
Exposing an [OpenAPI document](https://swagger.io/specification/) for your JSON:API endpoints enables providing a
[documentation website](https://swagger.io/tools/swagger-ui/) and generating typed
[client libraries](https://openapi-generator.tech/docs/generators/) in various languages.

The [JsonApiDotNetCore.OpenApi.Swashbuckle](https://github.com/json-api-dotnet/JsonApiDotNetCore/pkgs/nuget/JsonApiDotNetCore.OpenApi.Swashbuckle) NuGet package
Expand Down
2 changes: 1 addition & 1 deletion docs/usage/resources/inheritance.md
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ Resource definitions provide a better solution, see below.
### Resource definitions

In contrast to the request pipeline, JsonApiDotNetCore always executes the resource definition that matches the *stored* type.
This enables to implement business logic in a central place, irrespective of which endpoint was used or whether base types were used in relationships.
This enables implementing business logic in a central place, irrespective of which endpoint was used or whether base types were used in relationships.

To delegate logic for base types to their matching resource type, you can build a chain of resource definitions. And because you'll always get the
actually stored types (for relationships too), you can type-check left-side and right-side types in resources definitions.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,7 @@ private sealed class QueryState

public ILoggerFactory LoggerFactory { get; }

// Prevents importing a table multiple times and enables to reference a table imported by an inner/outer query.
// Prevents importing a table multiple times and enables referencing a table imported by an inner/outer query.
// In case of sub-queries, this may include temporary tables that won't survive in the final query.
public Dictionary<TableAccessorNode, Dictionary<RelationshipAttribute, TableAccessorNode>> RelatedTables { get; } = [];

Expand Down
4 changes: 2 additions & 2 deletions src/Examples/OpenApiKiotaClientExample/Worker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ private async Task UpdatePersonAsync(CancellationToken cancellationToken)
Id = "1",
Attributes = new AttributesInUpdatePersonRequest
{
// The --backing-store switch enables to send null and default values.
// The --backing-store switch enables sending null and default values.
FirstName = null,
LastName = "Doe"
}
Expand Down Expand Up @@ -145,7 +145,7 @@ private async Task SendOperationsRequestAsync(CancellationToken cancellationToke
Lid = "new-person",
Attributes = new AttributesInUpdatePersonRequest
{
// The --backing-store switch enables to send null and default values.
// The --backing-store switch enables sending null and default values.
FirstName = null
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public static class RuntimeTypeConverter
// Earlier versions of JsonApiDotNetCore failed to pass CultureInfo.InvariantCulture in the parsing below, which resulted in the 'current'
// culture being used. Unlike parsing JSON request/response bodies, this effectively meant that query strings were parsed based on the
// OS-level regional settings of the web server.
// Because this was fixed in a non-major release, the switch below enables to revert to the old behavior.
// Because this was fixed in a non-major release, the switch below enables reverting to the old behavior.

// With the switch activated, API developers can still choose between:
// - Requiring localized date/number formats: parsing occurs using the OS-level regional settings (the default).
Expand Down
2 changes: 1 addition & 1 deletion src/JsonApiDotNetCore.Annotations/TypeExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public static bool IsOrImplementsInterface<TInterface>(this Type? source)
}

/// <summary>
/// Whether the specified source type implements or equals the specified interface. This overload enables to test for an open generic interface.
/// Whether the specified source type implements or equals the specified interface. This overload enables testing for an open generic interface.
/// </summary>
private static bool IsOrImplementsInterface(this Type? source, Type interfaceType)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
namespace JsonApiDotNetCore.OpenApi.Swashbuckle;

/// <summary>
/// Enables to log recursive component schema generation at trace level.
/// Enables logging recursive component schema generation at trace level.
/// </summary>
internal sealed partial class SchemaGenerationTracer
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ public interface IOperationsTransaction : IAsyncDisposable
string TransactionId { get; }

/// <summary>
/// Enables to execute custom logic before processing of an operation starts.
/// Enables executing custom logic before processing of an operation starts.
/// </summary>
Task BeforeProcessOperationAsync(CancellationToken cancellationToken);

/// <summary>
/// Enables to execute custom logic after processing of an operation succeeds.
/// Enables executing custom logic after processing of an operation succeeds.
/// </summary>
Task AfterProcessOperationAsync(CancellationToken cancellationToken);

Expand Down
6 changes: 3 additions & 3 deletions src/JsonApiDotNetCore/Configuration/IJsonApiOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ public interface IJsonApiOptions
int? MaximumOperationsPerRequest { get; }

/// <summary>
/// Enables to override the default isolation level for database transactions, enabling to balance between consistency and performance. Defaults to
/// <c>null</c>, which leaves this up to Entity Framework Core to choose (and then it varies per database provider).
/// Enables overriding the default isolation level for database transactions to balance between consistency and performance. Defaults to <c>null</c>,
/// which leaves this up to Entity Framework Core to choose (and then it varies per database provider).
/// </summary>
IsolationLevel? TransactionIsolationLevel { get; }

Expand All @@ -188,7 +188,7 @@ public interface IJsonApiOptions
IReadOnlySet<JsonApiMediaTypeExtension> Extensions { get; }

/// <summary>
/// Enables to customize the settings that are used by the <see cref="JsonSerializer" />.
/// Enables customizing the settings that are used by the <see cref="JsonSerializer" />.
/// </summary>
/// <example>
/// The following example sets the naming convention to camel casing.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ private Dictionary<string, AttrAttribute>.ValueCollection GetAttributes(Type res
if (property.Name == nameof(Identifiable<>.Id))
{
// Although strictly not correct, 'id' is added to the list of attributes for convenience.
// For example, it enables to filter on ID, without the need to special-case existing logic.
// For example, it enables filtering on ID, without the need to special-case existing logic.
// And when using sparse fieldsets, it silently adds 'id' to the set of attributes to retrieve.

attribute = new AttrAttribute();
Expand Down
2 changes: 1 addition & 1 deletion src/JsonApiDotNetCore/Errors/InvalidModelStateException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ private abstract class ModelStateKeySegment
// The right part of the full key, which nested segments are produced from.
private readonly string _nextKey;

// Enables to resolve the runtime-type of a collection element, such as the resource type in an atomic:operation.
// Enables resolving the runtime-type of a collection element, such as the resource type in an atomic:operation.
protected Func<Type, int, Type?>? GetCollectionElementTypeCallback { get; }

// In case of a property, its declaring type. In case of an indexer, the collection type or collection element type (in case the parent is a relationship).
Expand Down
2 changes: 1 addition & 1 deletion src/JsonApiDotNetCore/Middleware/IJsonApiEndpointFilter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
namespace JsonApiDotNetCore.Middleware;

/// <summary>
/// Enables to remove JSON:API controller action methods at startup. For atomic:operation requests, see <see cref="IAtomicOperationFilter" />.
/// Enables removing JSON:API controller action methods at startup. For atomic:operation requests, see <see cref="IAtomicOperationFilter" />.
/// </summary>
[PublicAPI]
public interface IJsonApiEndpointFilter
Expand Down
4 changes: 2 additions & 2 deletions src/JsonApiDotNetCore/Queries/Expressions/AnyExpression.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
namespace JsonApiDotNetCore.Queries.Expressions;

/// <summary>
/// This expression allows to test if an attribute value equals any of the specified constants. It represents the "any" filter function, resulting from
/// text such as:
/// This expression tests if an attribute value equals any of the specified constants. It represents the "any" filter function, resulting from text such
/// as:
/// <c>
/// any(owner.name,'Jack','Joe','John')
/// </c>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
namespace JsonApiDotNetCore.Queries.Expressions;

/// <summary>
/// This expression allows to compare two operands using a comparison operator. It represents comparison filter functions, resulting from text such as:
/// This expression compares two operands using a comparison operator. It represents comparison filter functions, resulting from text such as:
/// <c>
/// equals(name,'Joe')
/// </c>
Expand Down
4 changes: 2 additions & 2 deletions src/JsonApiDotNetCore/Queries/Expressions/CountExpression.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
namespace JsonApiDotNetCore.Queries.Expressions;

/// <summary>
/// This expression allows to determine the number of related resources in a to-many relationship. It represents the "count" function, resulting from
/// text such as:
/// This expression determines the number of related resources in a to-many relationship. It represents the "count" function, resulting from text such
/// as:
/// <c>
/// count(articles)
/// </c>
Expand Down
2 changes: 1 addition & 1 deletion src/JsonApiDotNetCore/Queries/Expressions/HasExpression.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace JsonApiDotNetCore.Queries.Expressions;

/// <summary>
/// This expression allows to test if a to-many relationship has related resources, optionally with a condition. It represents the "has" filter function,
/// This expression tests if a to-many relationship has related resources, optionally with a condition. It represents the "has" filter function,
/// resulting from text such as:
/// <c>
/// has(articles)
Expand Down
4 changes: 2 additions & 2 deletions src/JsonApiDotNetCore/Queries/Expressions/IsTypeExpression.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
namespace JsonApiDotNetCore.Queries.Expressions;

/// <summary>
/// This expression allows to test if a resource in an inheritance hierarchy can be upcast to a derived type, optionally with a condition where the
/// derived type is accessible. It represents the "isType" filter function, resulting from text such as:
/// This expression tests if a resource in an inheritance hierarchy can be upcast to a derived type, optionally with a condition where the derived type
/// is accessible. It represents the "isType" filter function, resulting from text such as:
/// <c>
/// isType(,men)
/// </c>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
namespace JsonApiDotNetCore.Queries.Expressions;

/// <summary>
/// This expression allows to test whether one or all of its boolean operands are true. It represents the logical AND/OR filter functions, resulting from
/// text such as:
/// This expression tests whether one or all of its boolean operands are true. It represents the logical AND/OR filter functions, resulting from text
/// such as:
/// <c>
/// and(equals(title,'Work'),has(articles))
/// </c>
Expand Down
2 changes: 1 addition & 1 deletion src/JsonApiDotNetCore/Queries/Expressions/NotExpression.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
namespace JsonApiDotNetCore.Queries.Expressions;

/// <summary>
/// This expression allows to test for the logical negation of its operand. It represents the "not" filter function, resulting from text such as:
/// This expression tests for the logical negation of its operand. It represents the "not" filter function, resulting from text such as:
/// <c>
/// not(equals(title,'Work'))
/// </c>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public sealed class QueryClauseBuilderContext
public IQueryableBuilder QueryableBuilder { get; }

/// <summary>
/// Enables to pass custom state that you'd like to transfer between calls.
/// Enables passing custom state that you'd like to transfer between calls.
/// </summary>
public object? State { get; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public sealed class QueryableBuilderContext
public LambdaScopeFactory LambdaScopeFactory { get; }

/// <summary>
/// Enables to pass custom state that you'd like to transfer between calls.
/// Enables passing custom state that you'd like to transfer between calls.
/// </summary>
public object? State { get; }

Expand Down
Loading
Loading