Skip to content

docs(jsonapi): add JSON:API Resources documentation page#28

Merged
bedus-creation merged 7 commits into
mainfrom
docs/jsonapi-resource
Jun 8, 2026
Merged

docs(jsonapi): add JSON:API Resources documentation page#28
bedus-creation merged 7 commits into
mainfrom
docs/jsonapi-resource

Conversation

@bedus-creation

Copy link
Copy Markdown
Contributor

Summary

  • Adds /docs/jsonapi — a full reference page for the new JsonResource[T] generic base class introduced in fastapi-startkit-framework#96
  • Adds sidebar entry under Digging Deeper in VitePress config

What the page covers

  • Auto-type derivation from class name via inflection.tableize()
  • Auto-serialization from model.serialize() with hidden field support
  • collection() factory for plain lists and LengthAwarePaginator / SimplePaginator (pagination meta auto-populated)
  • with_() envelope hook for injecting extra top-level keys
  • Relationships and ?include= sideloading
  • Sparse fieldsets (?fields[type]=...)
  • parse_include / parse_fields query-param helpers
  • Full end-to-end usage example

Related

🤖 Generated with Claude Code

bedus-creation and others added 7 commits June 7, 2026 22:57
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>
@bedus-creation bedus-creation merged commit 84d2675 into main Jun 8, 2026
@bedus-creation bedus-creation deleted the docs/jsonapi-resource branch June 8, 2026 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant