Formalize custom Conduit fields on objects

Summary: Ref T9964. This just adds more structure to application fields, to make it harder to make typos and easier to validate them later.

Test Plan: Viewed APIs, called some APIs, saw good documentation and correct results.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9964

Differential Revision: https://secure.phabricator.com/D14776
This commit is contained in:
epriestley
2015-12-14 06:42:21 -08:00
parent 10cdc55cf7
commit 0a50219f1b
12 changed files with 141 additions and 90 deletions

View File

@@ -55,11 +55,11 @@ final class PhabricatorSpacesSearchEngineExtension
public function getFieldSpecificationsForConduit($object) {
return array(
'spacePHID' => array(
'type' => 'phid?',
'description' => pht(
'PHID of the policy space this object is part of.'),
),
id(new PhabricatorConduitSearchFieldSpecification())
->setKey('spacePHID')
->setType('phid?')
->setDescription(
pht('PHID of the policy space this object is part of.')),
);
}