Skip to content

Add Resource::map() for model-to-resource auto-resolution#35

Merged
brunogaspar merged 1 commit into
mainfrom
add-resource-map
May 17, 2026
Merged

Add Resource::map() for model-to-resource auto-resolution#35
brunogaspar merged 1 commit into
mainfrom
add-resource-map

Conversation

@brunogaspar
Copy link
Copy Markdown
Member

@brunogaspar brunogaspar commented May 17, 2026

Register a map of model classes to resource classes so the resource parameter becomes optional on success() and fromResource() calls.

The QueryBuilder and SuccessResponse auto-resolve the resource from the map when not explicitly provided. Explicit resource class always takes precedence.


View in Codesmith
Need help on this PR? Tag @codesmith with what you need.

  • Let Codesmith autofix CI failures and bot reviews

@brunogaspar brunogaspar self-assigned this May 17, 2026
@brunogaspar brunogaspar added the changelog:added New feature or addition label May 17, 2026
Register a map of model classes to resource classes so the resource
parameter becomes optional on success() and fromResource() calls.
The QueryBuilder and SuccessResponse auto-resolve the resource from
the map when not explicitly provided. Explicit resource class always
takes precedence.
@brunogaspar brunogaspar marked this pull request as ready for review May 17, 2026 17:27
@brunogaspar brunogaspar merged commit 4fe53b2 into main May 17, 2026
4 checks passed
@brunogaspar brunogaspar deleted the add-resource-map branch May 17, 2026 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog:added New feature or addition

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant