Skip to content

Commit 5ee3568

Browse files
docs: 📜 Clarify that filtering is only on main entity
1 parent c8c10f4 commit 5ee3568

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

‎CLAUDE.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Documentation is built using DocFX and deployed to GitHub Pages. The documentati
5555
- Base controller for JSON:API endpoints
5656
- Provides methods: `JsonApiOk()`, `JsonApiOkAsync()`, `JsonApiCreated()`, `JsonApiNotFound()`, etc.
5757
- Handles query parameter parsing and response formatting
58-
- Automatically applies filtering, sorting, pagination, and includes (relationships are auto-applied based on query parameters)
58+
- Automatically applies filtering, sorting, pagination, and includes (filtering applies to main entity; includes load related resources)
5959

6060
2. **JsonApiMapper** (`Mapping/JsonApiMapper.cs`)
6161
- Core mapper for converting entities to JSON:API resource structures

‎docs/docs/querying.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,12 @@ With this request, the toolkit will:
6565
- Return the first 10 results.
6666
- Include related author and reviews data in the response.
6767

68+
**Note:** Filtering applies only to the main resource type (books in this example). The `include` parameter controls which related resources are loaded in the response, but does not affect which main resources are returned by the filters.
69+
70+
## Limitations
71+
72+
- **Filtering on included resources**: Filters only apply to the main resource type. To filter based on related entity properties, structure your query at the main entity level or use custom controller logic.
73+
6874
## Missing Attributes in JSON:API Responses
6975

7076
When using our JSON:API implementation, you might notice that certain properties—such as `CompanyTenantId`—are not included in the API responses. This is because the default attribute mapping logic intentionally excludes any property that ends with "`Id`" (other than the primary `Id`).

0 commit comments

Comments
 (0)