{"action":"closed","issue":{"url":"https://api.github.com/repos/rust-lang/crates.io/issues/1267","repository_url":"https://api.github.com/repos/rust-lang/crates.io","labels_url":"https://api.github.com/repos/rust-lang/crates.io/issues/1267/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/crates.io/issues/1267/comments","events_url":"https://api.github.com/repos/rust-lang/crates.io/issues/1267/events","html_url":"https://github.com/rust-lang/crates.io/issues/1267","id":299537386,"number":1267,"title":"Non-null fields show up as null from API","user":{"login":"moore3071","id":8052748,"avatar_url":"https://avatars1.githubusercontent.com/u/8052748?v=4","gravatar_id":"","url":"https://api.github.com/users/moore3071","html_url":"https://github.com/moore3071","followers_url":"https://api.github.com/users/moore3071/followers","following_url":"https://api.github.com/users/moore3071/following{/other_user}","gists_url":"https://api.github.com/users/moore3071/gists{/gist_id}","starred_url":"https://api.github.com/users/moore3071/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moore3071/subscriptions","organizations_url":"https://api.github.com/users/moore3071/orgs","repos_url":"https://api.github.com/users/moore3071/repos","events_url":"https://api.github.com/users/moore3071/events{/privacy}","received_events_url":"https://api.github.com/users/moore3071/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-02-22T22:49:14Z","updated_at":"2018-05-03T21:48:07Z","closed_at":"2018-05-03T21:48:07Z","author_association":"NONE","body":"@yatriks noted in #1026 that certain fields are showing up as null in the response from the API even though the field is not null. For an example we'll look at the reply from `https://crates.io/api/v1/crates?keyword=test&q=compiletest_rs` which is:\r\n\r\n```json\r\n{\r\n  \"crates\": [\r\n    {\r\n      \"id\": \"compiletest_rs\",\r\n      \"name\": \"compiletest_rs\",\r\n      \"updated_at\": \"2018-01-28T13:22:52.519949+00:00\",\r\n      \"versions\": null,\r\n      \"keywords\": null,\r\n      \"categories\": null,\r\n      \"badges\": [],\r\n      \"created_at\": \"2015-05-09T09:20:56.585538+00:00\",\r\n      \"downloads\": 155752,\r\n      \"recent_downloads\": 64315,\r\n      \"max_version\": \"0.3.6\",\r\n      \"description\": \"The compiletest utility from the Rust compiler as a standalone testing harness\",\r\n      \"homepage\": null,\r\n      \"documentation\": null,\r\n      \"repository\": \"https://github.com/laumann/compiletest-rs\",\r\n      \"links\": {\r\n        \"version_downloads\": \"/api/v1/crates/compiletest_rs/downloads\",\r\n        \"versions\": \"/api/v1/crates/compiletest_rs/versions\",\r\n        \"owners\": \"/api/v1/crates/compiletest_rs/owners\",\r\n        \"owner_team\": \"/api/v1/crates/compiletest_rs/owner_team\",\r\n        \"owner_user\": \"/api/v1/crates/compiletest_rs/owner_user\",\r\n        \"reverse_dependencies\": \"/api/v1/crates/compiletest_rs/reverse_dependencies\"\r\n      },\r\n      \"exact_match\": true\r\n    }\r\n  ],\r\n  \"meta\": {\r\n    \"total\": 1\r\n  }\r\n}\r\n```\r\n\r\nMeanwhile if we look at the page for [compiletest_rs](https://crates.io/crates/compiletest_rs) we can see that the following fields shouldn't have been returned as null:\r\n- versions\r\n- keywords\r\n- documentation\r\n\r\n"}}
{"actor":{"display_login":"sgrif"}}