All fields must be specified to add extra fields
|Reported by:||rmccue||Owned by:|
|Milestone:||2013 Midterm (Beta)||Priority:||normal|
|Component:||JSON REST API||Keywords:|
If you want to specify additional fields from getPost, you need to know what the default fields are rather than just adding extra fields.
There are two solutions to this:
- We allow users to specify "default" as a special field that includes all the default fields
- We always include all default fields and the fields parameter becomes only additional fields
The second option seems like a better long-term solution, since API clients need to be able to rely on fields being there as per the specification. It also removes complexity from the system.
I'll likely revise this later, but implementing the first option for now as a stopgap solution. The XML-RPC API already uses this style, so I'll stick with it for now.