{"action":"created","comment":{"url":"https://api.github.com/repos/libgraviton/graviton/pulls/comments/33667733","id":33667733,"diff_hunk":"@@ -70,6 +75,18 @@ public function setSchemaModel($schemaModel)\n     }\n \n     /**\n+     * set SchemaUtils\n+     *\n+     * @param SchemaUtils $schemaUtils schema utils\n+     *\n+     * @return void\n+     */\n+    public function setSchemaUtils($schemaUtils)\n+    {\n+        $this->schemaUtils = $schemaUtils;\n+    }","path":"src/Graviton/SwaggerBundle/Service/Swagger.php","position":34,"original_position":34,"commit_id":"18b68917f2a4d3e5a7b38765d6435e6dc6a222c6","original_commit_id":"18b68917f2a4d3e5a7b38765d6435e6dc6a222c6","user":{"login":"hairmare","id":116588,"avatar_url":"https://avatars.githubusercontent.com/u/116588?v=3","gravatar_id":"","url":"https://api.github.com/users/hairmare","html_url":"https://github.com/hairmare","followers_url":"https://api.github.com/users/hairmare/followers","following_url":"https://api.github.com/users/hairmare/following{/other_user}","gists_url":"https://api.github.com/users/hairmare/gists{/gist_id}","starred_url":"https://api.github.com/users/hairmare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hairmare/subscriptions","organizations_url":"https://api.github.com/users/hairmare/orgs","repos_url":"https://api.github.com/users/hairmare/repos","events_url":"https://api.github.com/users/hairmare/events{/privacy}","received_events_url":"https://api.github.com/users/hairmare/received_events","type":"User","site_admin":false},"body":"Same here with constructor injections vs setting injection... ``getSwaggerSpec`` will fail badly way to late if no schemaUtils have been injected.","created_at":"2015-07-01T10:54:40Z","updated_at":"2015-07-01T10:54:40Z","html_url":"https://github.com/libgraviton/graviton/pull/158#discussion_r33667733","pull_request_url":"https://api.github.com/repos/libgraviton/graviton/pulls/158","_links":{"self":{"href":"https://api.github.com/repos/libgraviton/graviton/pulls/comments/33667733"},"html":{"href":"https://github.com/libgraviton/graviton/pull/158#discussion_r33667733"},"pull_request":{"href":"https://api.github.com/repos/libgraviton/graviton/pulls/158"}}},"pull_request":{"url":"https://api.github.com/repos/libgraviton/graviton/pulls/158","id":38886279,"html_url":"https://github.com/libgraviton/graviton/pull/158","diff_url":"https://github.com/libgraviton/graviton/pull/158.diff","patch_url":"https://github.com/libgraviton/graviton/pull/158.patch","issue_url":"https://api.github.com/repos/libgraviton/graviton/issues/158","number":158,"state":"open","locked":false,"title":"make swagger json valid & more complete","user":{"login":"narcoticfresh","id":245441,"avatar_url":"https://avatars.githubusercontent.com/u/245441?v=3","gravatar_id":"","url":"https://api.github.com/users/narcoticfresh","html_url":"https://github.com/narcoticfresh","followers_url":"https://api.github.com/users/narcoticfresh/followers","following_url":"https://api.github.com/users/narcoticfresh/following{/other_user}","gists_url":"https://api.github.com/users/narcoticfresh/gists{/gist_id}","starred_url":"https://api.github.com/users/narcoticfresh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/narcoticfresh/subscriptions","organizations_url":"https://api.github.com/users/narcoticfresh/orgs","repos_url":"https://api.github.com/users/narcoticfresh/repos","events_url":"https://api.github.com/users/narcoticfresh/events{/privacy}","received_events_url":"https://api.github.com/users/narcoticfresh/received_events","type":"User","site_admin":false},"body":"This PR aims to make our swagger.json pass as 'valid' from online validation, thus\r\n\r\n**See this**\r\nI pushed this branch to the cloud.\r\nSwagger validation result here: http://online.swagger.io/validator/?url=http://graviton-nue-swaggerfix-unstable.nova.scapp.io/swagger.json\r\nIf you check http://graviton-nue-swaggerfix-unstable.nova.scapp.io/swagger.json - you'll see that there are the Languages listed inside the 'object' struct of an Translatable (CTRL+F for \"translatable\")\r\n\r\n*Major changes in schema*\r\n* Only output primitive types in the \"field\" field of the Schema, more specifics are handled in the \"format\" field.\r\n* Some changes in the Schema schema to conform to spec\r\n* Include Languages in the presentation of the Translatable object (which now has `type: object, format: translatable`)\r\n\r\nTodo\r\n- [x] Push to cloud first and validate\r\n- [x] Use in wrapper context\r\n\r\nInternally, more has changed\r\n* Now, it's ensured that the output of the OPTIONS request to a item/collection schema is identical to the schema that is included in the swagger.json. This includes languages for translatables. \r\n* The previous unused \"preTranslatable\" feature has been moved to the `TranslatableDocumentInterface`. This can be used to flag preTranslated fields. They will be shown as translatable in Schema but are not treated like them as they are.. well.. preTranslated.. so.. already translated.. \r\n* As `TranslatableDocumentInterface` is used in the generated bundles; Generator also generates this new array the same way it does `translatedFields`","created_at":"2015-06-30T14:49:36Z","updated_at":"2015-07-01T10:54:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"90dd1d2a1e4315269e6ece207cbdfed072c0a5a2","assignee":{"login":"hairmare","id":116588,"avatar_url":"https://avatars.githubusercontent.com/u/116588?v=3","gravatar_id":"","url":"https://api.github.com/users/hairmare","html_url":"https://github.com/hairmare","followers_url":"https://api.github.com/users/hairmare/followers","following_url":"https://api.github.com/users/hairmare/following{/other_user}","gists_url":"https://api.github.com/users/hairmare/gists{/gist_id}","starred_url":"https://api.github.com/users/hairmare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hairmare/subscriptions","organizations_url":"https://api.github.com/users/hairmare/orgs","repos_url":"https://api.github.com/users/hairmare/repos","events_url":"https://api.github.com/users/hairmare/events{/privacy}","received_events_url":"https://api.github.com/users/hairmare/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/libgraviton/graviton/pulls/158/commits","review_comments_url":"https://api.github.com/repos/libgraviton/graviton/pulls/158/comments","review_comment_url":"https://api.github.com/repos/libgraviton/graviton/pulls/comments{/number}","comments_url":"https://api.github.com/repos/libgraviton/graviton/issues/158/comments","statuses_url":"https://api.github.com/repos/libgraviton/graviton/statuses/18b68917f2a4d3e5a7b38765d6435e6dc6a222c6","head":{"label":"libgraviton:feature/make-swagger-json-valid","ref":"feature/make-swagger-json-valid","sha":"18b68917f2a4d3e5a7b38765d6435e6dc6a222c6","user":{"login":"libgraviton","id":4174061,"avatar_url":"https://avatars.githubusercontent.com/u/4174061?v=3","gravatar_id":"","url":"https://api.github.com/users/libgraviton","html_url":"https://github.com/libgraviton","followers_url":"https://api.github.com/users/libgraviton/followers","following_url":"https://api.github.com/users/libgraviton/following{/other_user}","gists_url":"https://api.github.com/users/libgraviton/gists{/gist_id}","starred_url":"https://api.github.com/users/libgraviton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/libgraviton/subscriptions","organizations_url":"https://api.github.com/users/libgraviton/orgs","repos_url":"https://api.github.com/users/libgraviton/repos","events_url":"https://api.github.com/users/libgraviton/events{/privacy}","received_events_url":"https://api.github.com/users/libgraviton/received_events","type":"Organization","site_admin":false},"repo":{"id":13440432,"name":"graviton","full_name":"libgraviton/graviton","owner":{"login":"libgraviton","id":4174061,"avatar_url":"https://avatars.githubusercontent.com/u/4174061?v=3","gravatar_id":"","url":"https://api.github.com/users/libgraviton","html_url":"https://github.com/libgraviton","followers_url":"https://api.github.com/users/libgraviton/followers","following_url":"https://api.github.com/users/libgraviton/following{/other_user}","gists_url":"https://api.github.com/users/libgraviton/gists{/gist_id}","starred_url":"https://api.github.com/users/libgraviton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/libgraviton/subscriptions","organizations_url":"https://api.github.com/users/libgraviton/orgs","repos_url":"https://api.github.com/users/libgraviton/repos","events_url":"https://api.github.com/users/libgraviton/events{/privacy}","received_events_url":"https://api.github.com/users/libgraviton/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/libgraviton/graviton","description":"","fork":false,"url":"https://api.github.com/repos/libgraviton/graviton","forks_url":"https://api.github.com/repos/libgraviton/graviton/forks","keys_url":"https://api.github.com/repos/libgraviton/graviton/keys{/key_id}","collaborators_url":"https://api.github.com/repos/libgraviton/graviton/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/libgraviton/graviton/teams","hooks_url":"https://api.github.com/repos/libgraviton/graviton/hooks","issue_events_url":"https://api.github.com/repos/libgraviton/graviton/issues/events{/number}","events_url":"https://api.github.com/repos/libgraviton/graviton/events","assignees_url":"https://api.github.com/repos/libgraviton/graviton/assignees{/user}","branches_url":"https://api.github.com/repos/libgraviton/graviton/branches{/branch}","tags_url":"https://api.github.com/repos/libgraviton/graviton/tags","blobs_url":"https://api.github.com/repos/libgraviton/graviton/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/libgraviton/graviton/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/libgraviton/graviton/git/refs{/sha}","trees_url":"https://api.github.com/repos/libgraviton/graviton/git/trees{/sha}","statuses_url":"https://api.github.com/repos/libgraviton/graviton/statuses/{sha}","languages_url":"https://api.github.com/repos/libgraviton/graviton/languages","stargazers_url":"https://api.github.com/repos/libgraviton/graviton/stargazers","contributors_url":"https://api.github.com/repos/libgraviton/graviton/contributors","subscribers_url":"https://api.github.com/repos/libgraviton/graviton/subscribers","subscription_url":"https://api.github.com/repos/libgraviton/graviton/subscription","commits_url":"https://api.github.com/repos/libgraviton/graviton/commits{/sha}","git_commits_url":"https://api.github.com/repos/libgraviton/graviton/git/commits{/sha}","comments_url":"https://api.github.com/repos/libgraviton/graviton/comments{/number}","issue_comment_url":"https://api.github.com/repos/libgraviton/graviton/issues/comments{/number}","contents_url":"https://api.github.com/repos/libgraviton/graviton/contents/{+path}","compare_url":"https://api.github.com/repos/libgraviton/graviton/compare/{base}...{head}","merges_url":"https://api.github.com/repos/libgraviton/graviton/merges","archive_url":"https://api.github.com/repos/libgraviton/graviton/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/libgraviton/graviton/downloads","issues_url":"https://api.github.com/repos/libgraviton/graviton/issues{/number}","pulls_url":"https://api.github.com/repos/libgraviton/graviton/pulls{/number}","milestones_url":"https://api.github.com/repos/libgraviton/graviton/milestones{/number}","notifications_url":"https://api.github.com/repos/libgraviton/graviton/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/libgraviton/graviton/labels{/name}","releases_url":"https://api.github.com/repos/libgraviton/graviton/releases{/id}","created_at":"2013-10-09T11:26:14Z","updated_at":"2015-05-08T10:33:52Z","pushed_at":"2015-07-01T10:11:02Z","git_url":"git://github.com/libgraviton/graviton.git","ssh_url":"git@github.com:libgraviton/graviton.git","clone_url":"https://github.com/libgraviton/graviton.git","svn_url":"https://github.com/libgraviton/graviton","homepage":"http://gravity-platform.github.io/","size":6983,"stargazers_count":2,"watchers_count":2,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":4,"forks":2,"open_issues":4,"watchers":2,"default_branch":"develop"}},"base":{"label":"libgraviton:develop","ref":"develop","sha":"5fdf68226bdcb625cc836c5ea6939eac60716543","user":{"login":"libgraviton","id":4174061,"avatar_url":"https://avatars.githubusercontent.com/u/4174061?v=3","gravatar_id":"","url":"https://api.github.com/users/libgraviton","html_url":"https://github.com/libgraviton","followers_url":"https://api.github.com/users/libgraviton/followers","following_url":"https://api.github.com/users/libgraviton/following{/other_user}","gists_url":"https://api.github.com/users/libgraviton/gists{/gist_id}","starred_url":"https://api.github.com/users/libgraviton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/libgraviton/subscriptions","organizations_url":"https://api.github.com/users/libgraviton/orgs","repos_url":"https://api.github.com/users/libgraviton/repos","events_url":"https://api.github.com/users/libgraviton/events{/privacy}","received_events_url":"https://api.github.com/users/libgraviton/received_events","type":"Organization","site_admin":false},"repo":{"id":13440432,"name":"graviton","full_name":"libgraviton/graviton","owner":{"login":"libgraviton","id":4174061,"avatar_url":"https://avatars.githubusercontent.com/u/4174061?v=3","gravatar_id":"","url":"https://api.github.com/users/libgraviton","html_url":"https://github.com/libgraviton","followers_url":"https://api.github.com/users/libgraviton/followers","following_url":"https://api.github.com/users/libgraviton/following{/other_user}","gists_url":"https://api.github.com/users/libgraviton/gists{/gist_id}","starred_url":"https://api.github.com/users/libgraviton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/libgraviton/subscriptions","organizations_url":"https://api.github.com/users/libgraviton/orgs","repos_url":"https://api.github.com/users/libgraviton/repos","events_url":"https://api.github.com/users/libgraviton/events{/privacy}","received_events_url":"https://api.github.com/users/libgraviton/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/libgraviton/graviton","description":"","fork":false,"url":"https://api.github.com/repos/libgraviton/graviton","forks_url":"https://api.github.com/repos/libgraviton/graviton/forks","keys_url":"https://api.github.com/repos/libgraviton/graviton/keys{/key_id}","collaborators_url":"https://api.github.com/repos/libgraviton/graviton/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/libgraviton/graviton/teams","hooks_url":"https://api.github.com/repos/libgraviton/graviton/hooks","issue_events_url":"https://api.github.com/repos/libgraviton/graviton/issues/events{/number}","events_url":"https://api.github.com/repos/libgraviton/graviton/events","assignees_url":"https://api.github.com/repos/libgraviton/graviton/assignees{/user}","branches_url":"https://api.github.com/repos/libgraviton/graviton/branches{/branch}","tags_url":"https://api.github.com/repos/libgraviton/graviton/tags","blobs_url":"https://api.github.com/repos/libgraviton/graviton/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/libgraviton/graviton/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/libgraviton/graviton/git/refs{/sha}","trees_url":"https://api.github.com/repos/libgraviton/graviton/git/trees{/sha}","statuses_url":"https://api.github.com/repos/libgraviton/graviton/statuses/{sha}","languages_url":"https://api.github.com/repos/libgraviton/graviton/languages","stargazers_url":"https://api.github.com/repos/libgraviton/graviton/stargazers","contributors_url":"https://api.github.com/repos/libgraviton/graviton/contributors","subscribers_url":"https://api.github.com/repos/libgraviton/graviton/subscribers","subscription_url":"https://api.github.com/repos/libgraviton/graviton/subscription","commits_url":"https://api.github.com/repos/libgraviton/graviton/commits{/sha}","git_commits_url":"https://api.github.com/repos/libgraviton/graviton/git/commits{/sha}","comments_url":"https://api.github.com/repos/libgraviton/graviton/comments{/number}","issue_comment_url":"https://api.github.com/repos/libgraviton/graviton/issues/comments{/number}","contents_url":"https://api.github.com/repos/libgraviton/graviton/contents/{+path}","compare_url":"https://api.github.com/repos/libgraviton/graviton/compare/{base}...{head}","merges_url":"https://api.github.com/repos/libgraviton/graviton/merges","archive_url":"https://api.github.com/repos/libgraviton/graviton/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/libgraviton/graviton/downloads","issues_url":"https://api.github.com/repos/libgraviton/graviton/issues{/number}","pulls_url":"https://api.github.com/repos/libgraviton/graviton/pulls{/number}","milestones_url":"https://api.github.com/repos/libgraviton/graviton/milestones{/number}","notifications_url":"https://api.github.com/repos/libgraviton/graviton/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/libgraviton/graviton/labels{/name}","releases_url":"https://api.github.com/repos/libgraviton/graviton/releases{/id}","created_at":"2013-10-09T11:26:14Z","updated_at":"2015-05-08T10:33:52Z","pushed_at":"2015-07-01T10:11:02Z","git_url":"git://github.com/libgraviton/graviton.git","ssh_url":"git@github.com:libgraviton/graviton.git","clone_url":"https://github.com/libgraviton/graviton.git","svn_url":"https://github.com/libgraviton/graviton","homepage":"http://gravity-platform.github.io/","size":6983,"stargazers_count":2,"watchers_count":2,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":4,"forks":2,"open_issues":4,"watchers":2,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/libgraviton/graviton/pulls/158"},"html":{"href":"https://github.com/libgraviton/graviton/pull/158"},"issue":{"href":"https://api.github.com/repos/libgraviton/graviton/issues/158"},"comments":{"href":"https://api.github.com/repos/libgraviton/graviton/issues/158/comments"},"review_comments":{"href":"https://api.github.com/repos/libgraviton/graviton/pulls/158/comments"},"review_comment":{"href":"https://api.github.com/repos/libgraviton/graviton/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/libgraviton/graviton/pulls/158/commits"},"statuses":{"href":"https://api.github.com/repos/libgraviton/graviton/statuses/18b68917f2a4d3e5a7b38765d6435e6dc6a222c6"}}}}