docs(jsonapi): add JSON:API Resources documentation page#28
Merged
Conversation
Add a full reference page for the new JsonResource[T] generic base class: - Auto-type derivation from class name via inflection - Auto-serialization from model.serialize() with hidden field support - collection() factory for plain lists and paginated results - with_() envelope hook for extra top-level keys - Relationships, sparse fieldsets, and query-param helpers - Full usage examples Add sidebar entry under "Digging Deeper" in VitePress config. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…wording - Remove Backward Compatibility section (old-style API was never released) - Fix auto-serialization description: id is included in attributes by default; only fields in hidden=[] are excluded Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Rewrite the JSON:API docs around the new fluent chain API:
- .include("author", "comments")
- .fields("posts", ["title", "created_at"]).fields("users", ["name"])
- Chains work on both single resources and collections
- Auto query-string parsing still works when no chain methods are called
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/docs/jsonapi— a full reference page for the newJsonResource[T]generic base class introduced in fastapi-startkit-framework#96What the page covers
inflection.tableize()model.serialize()withhiddenfield supportcollection()factory for plain lists andLengthAwarePaginator/SimplePaginator(pagination meta auto-populated)with_()envelope hook for injecting extra top-level keys?include=sideloading?fields[type]=...)parse_include/parse_fieldsquery-param helpersRelated
🤖 Generated with Claude Code