-
-
Notifications
You must be signed in to change notification settings - Fork 46
Open
Labels
Description
Describe the Bug
Custom ctx-only ops declared with @op_ctx (e.g., publish, search) aren’t showing up under Book.opspecs after api.rebind(Book). Canonical ops (CRUD/list/clear/bulk) appear as expected, with alias_ctx applied.
Steps to Reproduce
- Define model with @alias_ctx and columns; include model to create tables.
- Define custom ops using @op_ctx as free functions, then attach to the class:
- Book.publish = _publish
- Book.search = _search
- Call api.include_model(Book, mount_router=False))
- Inspect:
- Book.opspecs.all → only canonical ops present
- Confirm canonical set is present:
- Output example:
[('add','create','collection'),('browse','list','collection'),('clear','clear','collection'),('delete','delete','member'),('get','read','member'),('replace','replace','member'),('update','update','member')]
Software Version
<0.4.0
Python Version
Python 3.8
Environment Details
No response
Relevant Logs or Error Output
Additional Context (Optional)
No response
Confirmation
- I have searched the existing issues for this bug.
- I have provided all necessary information to reproduce the bug.
Reactions are currently unavailable