{"action":"created","issue":{"url":"https://api.github.com/repos/hashicorp/nomad/issues/329","labels_url":"https://api.github.com/repos/hashicorp/nomad/issues/329/labels{/name}","comments_url":"https://api.github.com/repos/hashicorp/nomad/issues/329/comments","events_url":"https://api.github.com/repos/hashicorp/nomad/issues/329/events","html_url":"https://github.com/hashicorp/nomad/issues/329","id":113114662,"number":329,"title":"Remove API duplicates of nomad/structs and remove the compose api.","user":{"login":"dadgar","id":1047914,"avatar_url":"https://avatars.githubusercontent.com/u/1047914?v=3","gravatar_id":"","url":"https://api.github.com/users/dadgar","html_url":"https://github.com/dadgar","followers_url":"https://api.github.com/users/dadgar/followers","following_url":"https://api.github.com/users/dadgar/following{/other_user}","gists_url":"https://api.github.com/users/dadgar/gists{/gist_id}","starred_url":"https://api.github.com/users/dadgar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dadgar/subscriptions","organizations_url":"https://api.github.com/users/dadgar/orgs","repos_url":"https://api.github.com/users/dadgar/repos","events_url":"https://api.github.com/users/dadgar/events{/privacy}","received_events_url":"https://api.github.com/users/dadgar/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/hashicorp/nomad/labels/cleanup","name":"cleanup","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-10-23T23:07:22Z","updated_at":"2015-11-30T19:22:22Z","closed_at":null,"body":"The api package has copies of the nomad structs used everywhere else. We should just remove them (example https://github.com/hashicorp/nomad/blob/fd3dccead257b42110e58543e8f39ecafe34e21d/api/jobs.go#L111) and also the compose helpers (https://github.com/hashicorp/nomad/blob/master/api/compose_test.go)"},"comment":{"url":"https://api.github.com/repos/hashicorp/nomad/issues/comments/160731391","html_url":"https://github.com/hashicorp/nomad/issues/329#issuecomment-160731391","issue_url":"https://api.github.com/repos/hashicorp/nomad/issues/329","id":160731391,"user":{"login":"dadgar","id":1047914,"avatar_url":"https://avatars.githubusercontent.com/u/1047914?v=3","gravatar_id":"","url":"https://api.github.com/users/dadgar","html_url":"https://github.com/dadgar","followers_url":"https://api.github.com/users/dadgar/followers","following_url":"https://api.github.com/users/dadgar/following{/other_user}","gists_url":"https://api.github.com/users/dadgar/gists{/gist_id}","starred_url":"https://api.github.com/users/dadgar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dadgar/subscriptions","organizations_url":"https://api.github.com/users/dadgar/orgs","repos_url":"https://api.github.com/users/dadgar/repos","events_url":"https://api.github.com/users/dadgar/events{/privacy}","received_events_url":"https://api.github.com/users/dadgar/received_events","type":"User","site_admin":false},"created_at":"2015-11-30T19:22:22Z","updated_at":"2015-11-30T19:22:22Z","body":"You will notice that the two packages duplicate all structs returned by the HTTP API. I linked an example. So the task is really to make the API layer return structs defined in nomad/structs \r\n\r\n[nomad/structs package](https://github.com/hashicorp/nomad/blob/fd3dccead257b42110e58543e8f39ecafe34e21d/nomad/structs/structs.go#L733)\r\n[api package](https://github.com/hashicorp/nomad/blob/fd3dccead257b42110e58543e8f39ecafe34e21d/api/jobs.go#L111)\r\n"}}