Feature #3818
open[API] Discovery document schema should include whether field on resource is writable or read-only.
Description
- modified_* and created_at (which are attr_protected)
- updated_at (which should be either removed outright or protected with attr_protected)
- (any others?)
- attr_protected can surely be introspected, but is deprecated in rails 4.
Files
Updated by Peter Amstutz over 10 years ago
- Subject changed from Discovery document should include whether field is writable or read-only. to Discovery document schema should include whether field on resource is writable or read-only.
Updated by Peter Amstutz over 10 years ago
- Subject changed from Discovery document schema should include whether field on resource is writable or read-only. to [API] Discovery document schema should include whether field on resource is writable or read-only.
- Category set to API
Updated by Peter Amstutz over 10 years ago
- Target version set to Arvados Future Sprints
Updated by Brett Smith over 9 years ago
- File 3818-try1.patch 3818-try1.patch added
I started going down this path to try to address an issue I was encountering in #4253. I eventually found out that Workbench has other infrastructure to solve my issue, so I switched to using that, but here's my work in progress for posterity.
This patch hacks up the schema controller to put all API attributes in the discovery document, whether they're in the database or not. It also marks non-database attributes as readonly. It could be extended to advertise that flag for other protected attributes without too much trouble.
This patch also starts teaching Workbench to deal with the newly-advertised attributes correctly. What's left to be done is to clean up some of the workaround code that Workbench already has for cases like these. That's necessary to avoid conflicts between the new handling code and the old handling code: a handful of Workbench tests are failing after this patch.
Updated by Peter Amstutz over 3 years ago
- Target version deleted (
Arvados Future Sprints)