{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/7584","repository_url":"https://api.github.com/repos/kubernetes/kubernetes","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/7584/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/7584/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/7584/events","html_url":"https://github.com/kubernetes/kubernetes/issues/7584","id":72269450,"number":7584,"title":"Versioned API objects should be in a self-contained package","user":{"login":"fabioy","id":6294975,"avatar_url":"https://avatars.githubusercontent.com/u/6294975?v=3","gravatar_id":"","url":"https://api.github.com/users/fabioy","html_url":"https://github.com/fabioy","followers_url":"https://api.github.com/users/fabioy/followers","following_url":"https://api.github.com/users/fabioy/following{/other_user}","gists_url":"https://api.github.com/users/fabioy/gists{/gist_id}","starred_url":"https://api.github.com/users/fabioy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabioy/subscriptions","organizations_url":"https://api.github.com/users/fabioy/orgs","repos_url":"https://api.github.com/users/fabioy/repos","events_url":"https://api.github.com/users/fabioy/events{/privacy}","received_events_url":"https://api.github.com/users/fabioy/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/component/apiserver","name":"component/apiserver","color":"0052cc"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/kind/cleanup","name":"kind/cleanup","color":"c7def8"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/kind/technical-debt","name":"kind/technical-debt","color":"c7def8"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/priority/P2","name":"priority/P2","color":"fbca04"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/team/CSI","name":"team/CSI","color":"d2b48c"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/kubernetes/kubernetes/milestones/17","html_url":"https://github.com/kubernetes/kubernetes/milestones/next-candidate","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/milestones/17/labels","id":1510379,"number":17,"title":"next-candidate","description":"Candidates for the next milestone","creator":{"login":"bgrant0607","id":7725777,"avatar_url":"https://avatars.githubusercontent.com/u/7725777?v=3","gravatar_id":"","url":"https://api.github.com/users/bgrant0607","html_url":"https://github.com/bgrant0607","followers_url":"https://api.github.com/users/bgrant0607/followers","following_url":"https://api.github.com/users/bgrant0607/following{/other_user}","gists_url":"https://api.github.com/users/bgrant0607/gists{/gist_id}","starred_url":"https://api.github.com/users/bgrant0607/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bgrant0607/subscriptions","organizations_url":"https://api.github.com/users/bgrant0607/orgs","repos_url":"https://api.github.com/users/bgrant0607/repos","events_url":"https://api.github.com/users/bgrant0607/events{/privacy}","received_events_url":"https://api.github.com/users/bgrant0607/received_events","type":"User","site_admin":false},"open_issues":114,"closed_issues":2,"state":"open","created_at":"2016-01-16T17:58:20Z","updated_at":"2016-02-10T21:27:34Z","due_on":null,"closed_at":null},"comments":6,"created_at":"2015-04-30T20:14:29Z","updated_at":"2016-02-10T21:30:10Z","closed_at":null,"body":"TL;DR: The versioned API types should be self-contained package. For example, the file \"pkg/api/v1beta3/types.go\" is not self contained and contains tendrils to other internal types (see below). This is somewhat cruddy for other clients wanting to import minimal source from k8s just to call its APIs. It'd be nice to have a single package to import to get the API object definitions (i.e. for json unmarshalling, etc).\r\n\r\nObserved outside of package depencies in \"pkg/api/v1beta3/types.go\":\r\n\r\n\"pkg/runtime\" - The \"List\" type contains a field \"Items []runtime.RawExtension\". \"RawExtension\" is a trivial struct containing only a \"[]byte\".\r\n\r\n\"pkg/types\" - Various places uses the \"types.UID\" struct, which is an alias to \"string\".\r\n\r\n\"pkg/util\" - Two types from this package are used: \"util.Time\" and \"util.IntOrString\". The former is a wrapper on Go's Time object, with extra functions for custom JSON serialization (RFC3339 compliant) in \"pkg/util/time.go\". \"IntOrString\" is the dual-mode struct holding an int value or a string (\"pkg/util/util.go\").\r\n\r\n\"pkg/api/resource\" - The \"ResourceList\" object is a map whose keys are \"resource.Quantity\" objects. The \"Quantity\" object contains a field to \"inf.Dec\", which is an infinite precision decimal package imported from \"speter.net/go/exp/math/dec/inf\". This is the only package which is external to k8s.\r\n\r\nI know that some of the json annotations added are to support swagger, but the go->swagger->go thing seems like an unnecessary complexity."},"comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments/182589616","html_url":"https://github.com/kubernetes/kubernetes/issues/7584#issuecomment-182589616","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/7584","id":182589616,"user":{"login":"lavalamp","id":647318,"avatar_url":"https://avatars.githubusercontent.com/u/647318?v=3","gravatar_id":"","url":"https://api.github.com/users/lavalamp","html_url":"https://github.com/lavalamp","followers_url":"https://api.github.com/users/lavalamp/followers","following_url":"https://api.github.com/users/lavalamp/following{/other_user}","gists_url":"https://api.github.com/users/lavalamp/gists{/gist_id}","starred_url":"https://api.github.com/users/lavalamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lavalamp/subscriptions","organizations_url":"https://api.github.com/users/lavalamp/orgs","repos_url":"https://api.github.com/users/lavalamp/repos","events_url":"https://api.github.com/users/lavalamp/events{/privacy}","received_events_url":"https://api.github.com/users/lavalamp/received_events","type":"User","site_admin":false},"created_at":"2016-02-10T21:30:10Z","updated_at":"2016-02-10T21:30:10Z","body":"This is closely related to #4874 and #5660."}}