{"action":"created","issue":{"url":"https://api.github.com/repos/keystonejs/keystone/issues/3209","repository_url":"https://api.github.com/repos/keystonejs/keystone","labels_url":"https://api.github.com/repos/keystonejs/keystone/issues/3209/labels{/name}","comments_url":"https://api.github.com/repos/keystonejs/keystone/issues/3209/comments","events_url":"https://api.github.com/repos/keystonejs/keystone/issues/3209/events","html_url":"https://github.com/keystonejs/keystone/issues/3209","id":167390691,"number":3209,"title":"Call to action - Please review the new API Spec","user":{"login":"JedWatson","id":872310,"avatar_url":"https://avatars.githubusercontent.com/u/872310?v=3","gravatar_id":"","url":"https://api.github.com/users/JedWatson","html_url":"https://github.com/JedWatson","followers_url":"https://api.github.com/users/JedWatson/followers","following_url":"https://api.github.com/users/JedWatson/following{/other_user}","gists_url":"https://api.github.com/users/JedWatson/gists{/gist_id}","starred_url":"https://api.github.com/users/JedWatson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JedWatson/subscriptions","organizations_url":"https://api.github.com/users/JedWatson/orgs","repos_url":"https://api.github.com/users/JedWatson/repos","events_url":"https://api.github.com/users/JedWatson/events{/privacy}","received_events_url":"https://api.github.com/users/JedWatson/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/keystonejs/keystone/labels/discussion","name":"discussion","color":"4a558a"},{"url":"https://api.github.com/repos/keystonejs/keystone/labels/help%20wanted","name":"help wanted","color":"009800"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/keystonejs/keystone/milestones/5","html_url":"https://github.com/keystonejs/keystone/milestones/0.4.0","labels_url":"https://api.github.com/repos/keystonejs/keystone/milestones/5/labels","id":917933,"number":5,"title":"0.4.0","description":"","creator":{"login":"morenoh149","id":587438,"avatar_url":"https://avatars.githubusercontent.com/u/587438?v=3","gravatar_id":"","url":"https://api.github.com/users/morenoh149","html_url":"https://github.com/morenoh149","followers_url":"https://api.github.com/users/morenoh149/followers","following_url":"https://api.github.com/users/morenoh149/following{/other_user}","gists_url":"https://api.github.com/users/morenoh149/gists{/gist_id}","starred_url":"https://api.github.com/users/morenoh149/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morenoh149/subscriptions","organizations_url":"https://api.github.com/users/morenoh149/orgs","repos_url":"https://api.github.com/users/morenoh149/repos","events_url":"https://api.github.com/users/morenoh149/events{/privacy}","received_events_url":"https://api.github.com/users/morenoh149/received_events","type":"User","site_admin":false},"open_issues":26,"closed_issues":68,"state":"open","created_at":"2014-12-30T20:01:34Z","updated_at":"2016-07-25T23:39:00Z","due_on":null,"closed_at":null},"comments":18,"created_at":"2016-07-25T15:12:02Z","updated_at":"2016-07-26T15:19:47Z","closed_at":null,"body":"I've written up a spec for the new Admin API and would *really* like some feedback on it.\r\n\r\nThe endpoints in the spec are all implemented and in use, and I've cleaned them up slightly as I've been writing up how they work.\r\n\r\nThe next part of the plan is to make these generally available through List methods (so you can customise them and easily add user-facing versions for your app) so it's really important to get them right and make sure the design is one that we're happy to live with, so please shout out with any feedback you've got (PRs are also welcome!)\r\n\r\nSpecs are here: https://github.com/keystonejs/keystone/blob/master/admin/server/api/Readme.md\r\n\r\ncc @mxstbr @molomby @josephg @wmertens @creynders "},"comment":{"url":"https://api.github.com/repos/keystonejs/keystone/issues/comments/235301897","html_url":"https://github.com/keystonejs/keystone/issues/3209#issuecomment-235301897","issue_url":"https://api.github.com/repos/keystonejs/keystone/issues/3209","id":235301897,"user":{"login":"JedWatson","id":872310,"avatar_url":"https://avatars.githubusercontent.com/u/872310?v=3","gravatar_id":"","url":"https://api.github.com/users/JedWatson","html_url":"https://github.com/JedWatson","followers_url":"https://api.github.com/users/JedWatson/followers","following_url":"https://api.github.com/users/JedWatson/following{/other_user}","gists_url":"https://api.github.com/users/JedWatson/gists{/gist_id}","starred_url":"https://api.github.com/users/JedWatson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JedWatson/subscriptions","organizations_url":"https://api.github.com/users/JedWatson/orgs","repos_url":"https://api.github.com/users/JedWatson/repos","events_url":"https://api.github.com/users/JedWatson/events{/privacy}","received_events_url":"https://api.github.com/users/JedWatson/received_events","type":"User","site_admin":false},"created_at":"2016-07-26T15:19:47Z","updated_at":"2016-07-26T15:19:47Z","body":"@wmertens\r\n\r\n> Is there a reason to keep the item results in the legacy format? I never understood why the fields are sent as their own object under fields.\r\n\r\nTo separate the \"root\" concepts of `id` and `name`, and the structured values in the fields. Keystone always wants to know the ID and Name of documents, regardless of what their paths in the schema are. This keeps the actual schema isolated.\r\n\r\nSimilar argument to the one JSON API makes (maybe we could align them more closely?)\r\n\r\n> The way I see it, HTTP status codes are meant for generic interaction\r\nbetween browsers and servers. However, in this case we have very specific\r\ninteraction of a client implementing the Keystone API and Keystone. HTTP\r\nerror codes just add extra state to the interaction with no benefit I can\r\nthink of.\r\n\r\nI'm actually hoping to standardise this as something that can be used in projects as well. So if you're writing a React Native app with a Keystone back-end, just tell keystone to generate you the API Endpoints you want and off you go. Ideally, everything (including status codes) should behave as close to \"best practice\" and consistently as possible\r\n\r\nTrying to remove as much of the special behaviour in Keystone as possible, without overcomplicating things or losing the bits that make it really nice to work with. Hard line to walk :wink:\r\n\r\n@geloescht @webteckie being able to specify only some paths in `expandRelationshipFields` makes sense in theory, but I couldn't actually think of a real-world case where it would be useful to support that complexity. If you want field data out of relationships, at the moment I think it's best to keep it simple in the API and make additional calls to fetch the related items. Otherwise things get recursive pretty quickly, and flattening out the options for that gets really complex / custom / magical. We can revisit that decision once 0.4 ships, though!\r\n\r\nI agree with nesting data in the return structure, will update the spec accordingly. It'll make the `GET {list}` and `GET {list}/:id` endpoints more consistent too, I guess, which is nice!\r\n\r\n> In the Duplicate User case, why is it a good idea to return back all info about the duplicate user?\r\n\r\nIt's not, really, that's just me enumerating the complete data we get back from mongoose. Any lower-level error like that is passed back as mongoose (or the driver) provides it. Not ideal but I'd prefer not to add any additional middle-man processing at this stage on lower-level errors that could occur."}}
{"actor":{"display_login":"JedWatson"}}