{"action":"created","comment":{"url":"https://api.github.com/repos/go-swagger/go-swagger/pulls/comments/197620684","pull_request_review_id":131403767,"id":197620684,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NzYyMDY4NA==","diff_hunk":"@@ -0,0 +1,139 @@\n+# Transforming specifications\n+\n+The `swagger` toolkit allows some transformation to be carried on with a specification.\n+\n+Currently it is possible to apply the following transforms:\n+- expansion: this expands all `$ref`'s in a spec\n+- minimal flattening: carries on minimal transformation to a spec to be workable for the swagger codegen\n+- full flattening: performs minimal flattening and in addition, replaces all complex constructs in schemas by named definitions\n+- mixin: merges one or more specifications into a primary spec\n+\n+### Expansion\n+\n+Expanding a spec may prove useful to produce documentation or test cases. The primary intent is not code generation.\n+\n+> **NOTE**: Circular `$ref` are detected and remain as local `$ref`\n+\n+Usage:\n+\n+`swagger expand {spec}`\n+or\n+\n+`swagger flatten --with-expand` {spec}`\n+\n+or with codegen commands:\n+\n+`swagger generate [model|server|client|operation|...] --spec={spec} --with-expand`\n+\n+> **NOTE**: codegen may fail in some situations with spec expansion:\n+> - polymorphism: the original intent of the `$ref` to a discriminated type(i.e. _extends type..._) is lost with expansion","path":"docs/use/transform.md","position":29,"original_position":29,"commit_id":"1b3e277bf5aa47dd4ffaab1a317e441c5cfa99f8","original_commit_id":"1b3e277bf5aa47dd4ffaab1a317e441c5cfa99f8","user":{"login":"gregmarr","id":8569738,"node_id":"MDQ6VXNlcjg1Njk3Mzg=","avatar_url":"https://avatars2.githubusercontent.com/u/8569738?v=4","gravatar_id":"","url":"https://api.github.com/users/gregmarr","html_url":"https://github.com/gregmarr","followers_url":"https://api.github.com/users/gregmarr/followers","following_url":"https://api.github.com/users/gregmarr/following{/other_user}","gists_url":"https://api.github.com/users/gregmarr/gists{/gist_id}","starred_url":"https://api.github.com/users/gregmarr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gregmarr/subscriptions","organizations_url":"https://api.github.com/users/gregmarr/orgs","repos_url":"https://api.github.com/users/gregmarr/repos","events_url":"https://api.github.com/users/gregmarr/events{/privacy}","received_events_url":"https://api.github.com/users/gregmarr/received_events","type":"User","site_admin":false},"body":"I'm thinking \"to be a discriminated type\" or \"as a descriminated type\" would be better here (and a space before the open paren).\r\n","created_at":"2018-06-23T19:28:40Z","updated_at":"2018-06-23T19:28:40Z","html_url":"https://github.com/go-swagger/go-swagger/pull/1589#discussion_r197620684","pull_request_url":"https://api.github.com/repos/go-swagger/go-swagger/pulls/1589","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/go-swagger/go-swagger/pulls/comments/197620684"},"html":{"href":"https://github.com/go-swagger/go-swagger/pull/1589#discussion_r197620684"},"pull_request":{"href":"https://api.github.com/repos/go-swagger/go-swagger/pulls/1589"}}},"pull_request":{"url":"https://api.github.com/repos/go-swagger/go-swagger/pulls/1589","id":196889220,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk2ODg5MjIw","html_url":"https://github.com/go-swagger/go-swagger/pull/1589","diff_url":"https://github.com/go-swagger/go-swagger/pull/1589.diff","patch_url":"https://github.com/go-swagger/go-swagger/pull/1589.patch","issue_url":"https://api.github.com/repos/go-swagger/go-swagger/issues/1589","number":1589,"state":"open","locked":false,"title":"Doc for new flatten","user":{"login":"fredbi","id":14262513,"node_id":"MDQ6VXNlcjE0MjYyNTEz","avatar_url":"https://avatars1.githubusercontent.com/u/14262513?v=4","gravatar_id":"","url":"https://api.github.com/users/fredbi","html_url":"https://github.com/fredbi","followers_url":"https://api.github.com/users/fredbi/followers","following_url":"https://api.github.com/users/fredbi/following{/other_user}","gists_url":"https://api.github.com/users/fredbi/gists{/gist_id}","starred_url":"https://api.github.com/users/fredbi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fredbi/subscriptions","organizations_url":"https://api.github.com/users/fredbi/orgs","repos_url":"https://api.github.com/users/fredbi/repos","events_url":"https://api.github.com/users/fredbi/events{/privacy}","received_events_url":"https://api.github.com/users/fredbi/received_events","type":"User","site_admin":false},"body":"Documents PR #1588 and issue #1572 ","created_at":"2018-06-23T08:10:27Z","updated_at":"2018-06-23T19:28:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8be71c2415faff1ba1cd0260385c3aa881ca7dd4","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/go-swagger/go-swagger/pulls/1589/commits","review_comments_url":"https://api.github.com/repos/go-swagger/go-swagger/pulls/1589/comments","review_comment_url":"https://api.github.com/repos/go-swagger/go-swagger/pulls/comments{/number}","comments_url":"https://api.github.com/repos/go-swagger/go-swagger/issues/1589/comments","statuses_url":"https://api.github.com/repos/go-swagger/go-swagger/statuses/1b3e277bf5aa47dd4ffaab1a317e441c5cfa99f8","head":{"label":"fredbi:doc-flatten","ref":"doc-flatten","sha":"1b3e277bf5aa47dd4ffaab1a317e441c5cfa99f8","user":{"login":"fredbi","id":14262513,"node_id":"MDQ6VXNlcjE0MjYyNTEz","avatar_url":"https://avatars1.githubusercontent.com/u/14262513?v=4","gravatar_id":"","url":"https://api.github.com/users/fredbi","html_url":"https://github.com/fredbi","followers_url":"https://api.github.com/users/fredbi/followers","following_url":"https://api.github.com/users/fredbi/following{/other_user}","gists_url":"https://api.github.com/users/fredbi/gists{/gist_id}","starred_url":"https://api.github.com/users/fredbi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fredbi/subscriptions","organizations_url":"https://api.github.com/users/fredbi/orgs","repos_url":"https://api.github.com/users/fredbi/repos","events_url":"https://api.github.com/users/fredbi/events{/privacy}","received_events_url":"https://api.github.com/users/fredbi/received_events","type":"User","site_admin":false},"repo":{"id":113154485,"node_id":"MDEwOlJlcG9zaXRvcnkxMTMxNTQ0ODU=","name":"go-swagger","full_name":"fredbi/go-swagger","owner":{"login":"fredbi","id":14262513,"node_id":"MDQ6VXNlcjE0MjYyNTEz","avatar_url":"https://avatars1.githubusercontent.com/u/14262513?v=4","gravatar_id":"","url":"https://api.github.com/users/fredbi","html_url":"https://github.com/fredbi","followers_url":"https://api.github.com/users/fredbi/followers","following_url":"https://api.github.com/users/fredbi/following{/other_user}","gists_url":"https://api.github.com/users/fredbi/gists{/gist_id}","starred_url":"https://api.github.com/users/fredbi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fredbi/subscriptions","organizations_url":"https://api.github.com/users/fredbi/orgs","repos_url":"https://api.github.com/users/fredbi/repos","events_url":"https://api.github.com/users/fredbi/events{/privacy}","received_events_url":"https://api.github.com/users/fredbi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fredbi/go-swagger","description":"Swagger 2.0 implementation for go","fork":true,"url":"https://api.github.com/repos/fredbi/go-swagger","forks_url":"https://api.github.com/repos/fredbi/go-swagger/forks","keys_url":"https://api.github.com/repos/fredbi/go-swagger/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fredbi/go-swagger/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fredbi/go-swagger/teams","hooks_url":"https://api.github.com/repos/fredbi/go-swagger/hooks","issue_events_url":"https://api.github.com/repos/fredbi/go-swagger/issues/events{/number}","events_url":"https://api.github.com/repos/fredbi/go-swagger/events","assignees_url":"https://api.github.com/repos/fredbi/go-swagger/assignees{/user}","branches_url":"https://api.github.com/repos/fredbi/go-swagger/branches{/branch}","tags_url":"https://api.github.com/repos/fredbi/go-swagger/tags","blobs_url":"https://api.github.com/repos/fredbi/go-swagger/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fredbi/go-swagger/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fredbi/go-swagger/git/refs{/sha}","trees_url":"https://api.github.com/repos/fredbi/go-swagger/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fredbi/go-swagger/statuses/{sha}","languages_url":"https://api.github.com/repos/fredbi/go-swagger/languages","stargazers_url":"https://api.github.com/repos/fredbi/go-swagger/stargazers","contributors_url":"https://api.github.com/repos/fredbi/go-swagger/contributors","subscribers_url":"https://api.github.com/repos/fredbi/go-swagger/subscribers","subscription_url":"https://api.github.com/repos/fredbi/go-swagger/subscription","commits_url":"https://api.github.com/repos/fredbi/go-swagger/commits{/sha}","git_commits_url":"https://api.github.com/repos/fredbi/go-swagger/git/commits{/sha}","comments_url":"https://api.github.com/repos/fredbi/go-swagger/comments{/number}","issue_comment_url":"https://api.github.com/repos/fredbi/go-swagger/issues/comments{/number}","contents_url":"https://api.github.com/repos/fredbi/go-swagger/contents/{+path}","compare_url":"https://api.github.com/repos/fredbi/go-swagger/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fredbi/go-swagger/merges","archive_url":"https://api.github.com/repos/fredbi/go-swagger/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fredbi/go-swagger/downloads","issues_url":"https://api.github.com/repos/fredbi/go-swagger/issues{/number}","pulls_url":"https://api.github.com/repos/fredbi/go-swagger/pulls{/number}","milestones_url":"https://api.github.com/repos/fredbi/go-swagger/milestones{/number}","notifications_url":"https://api.github.com/repos/fredbi/go-swagger/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fredbi/go-swagger/labels{/name}","releases_url":"https://api.github.com/repos/fredbi/go-swagger/releases{/id}","deployments_url":"https://api.github.com/repos/fredbi/go-swagger/deployments","created_at":"2017-12-05T08:29:42Z","updated_at":"2018-06-22T19:59:54Z","pushed_at":"2018-06-23T08:05:02Z","git_url":"git://github.com/fredbi/go-swagger.git","ssh_url":"git@github.com:fredbi/go-swagger.git","clone_url":"https://github.com/fredbi/go-swagger.git","svn_url":"https://github.com/fredbi/go-swagger","homepage":"https://goswagger.io","size":43862,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"go-swagger:master","ref":"master","sha":"73498993a0a27ed9b0a063d3e94536a6a050fa22","user":{"login":"go-swagger","id":10362650,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwMzYyNjUw","avatar_url":"https://avatars2.githubusercontent.com/u/10362650?v=4","gravatar_id":"","url":"https://api.github.com/users/go-swagger","html_url":"https://github.com/go-swagger","followers_url":"https://api.github.com/users/go-swagger/followers","following_url":"https://api.github.com/users/go-swagger/following{/other_user}","gists_url":"https://api.github.com/users/go-swagger/gists{/gist_id}","starred_url":"https://api.github.com/users/go-swagger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/go-swagger/subscriptions","organizations_url":"https://api.github.com/users/go-swagger/orgs","repos_url":"https://api.github.com/users/go-swagger/repos","events_url":"https://api.github.com/users/go-swagger/events{/privacy}","received_events_url":"https://api.github.com/users/go-swagger/received_events","type":"Organization","site_admin":false},"repo":{"id":26726495,"node_id":"MDEwOlJlcG9zaXRvcnkyNjcyNjQ5NQ==","name":"go-swagger","full_name":"go-swagger/go-swagger","owner":{"login":"go-swagger","id":10362650,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwMzYyNjUw","avatar_url":"https://avatars2.githubusercontent.com/u/10362650?v=4","gravatar_id":"","url":"https://api.github.com/users/go-swagger","html_url":"https://github.com/go-swagger","followers_url":"https://api.github.com/users/go-swagger/followers","following_url":"https://api.github.com/users/go-swagger/following{/other_user}","gists_url":"https://api.github.com/users/go-swagger/gists{/gist_id}","starred_url":"https://api.github.com/users/go-swagger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/go-swagger/subscriptions","organizations_url":"https://api.github.com/users/go-swagger/orgs","repos_url":"https://api.github.com/users/go-swagger/repos","events_url":"https://api.github.com/users/go-swagger/events{/privacy}","received_events_url":"https://api.github.com/users/go-swagger/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/go-swagger/go-swagger","description":"Swagger 2.0 implementation for go","fork":false,"url":"https://api.github.com/repos/go-swagger/go-swagger","forks_url":"https://api.github.com/repos/go-swagger/go-swagger/forks","keys_url":"https://api.github.com/repos/go-swagger/go-swagger/keys{/key_id}","collaborators_url":"https://api.github.com/repos/go-swagger/go-swagger/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/go-swagger/go-swagger/teams","hooks_url":"https://api.github.com/repos/go-swagger/go-swagger/hooks","issue_events_url":"https://api.github.com/repos/go-swagger/go-swagger/issues/events{/number}","events_url":"https://api.github.com/repos/go-swagger/go-swagger/events","assignees_url":"https://api.github.com/repos/go-swagger/go-swagger/assignees{/user}","branches_url":"https://api.github.com/repos/go-swagger/go-swagger/branches{/branch}","tags_url":"https://api.github.com/repos/go-swagger/go-swagger/tags","blobs_url":"https://api.github.com/repos/go-swagger/go-swagger/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/go-swagger/go-swagger/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/go-swagger/go-swagger/git/refs{/sha}","trees_url":"https://api.github.com/repos/go-swagger/go-swagger/git/trees{/sha}","statuses_url":"https://api.github.com/repos/go-swagger/go-swagger/statuses/{sha}","languages_url":"https://api.github.com/repos/go-swagger/go-swagger/languages","stargazers_url":"https://api.github.com/repos/go-swagger/go-swagger/stargazers","contributors_url":"https://api.github.com/repos/go-swagger/go-swagger/contributors","subscribers_url":"https://api.github.com/repos/go-swagger/go-swagger/subscribers","subscription_url":"https://api.github.com/repos/go-swagger/go-swagger/subscription","commits_url":"https://api.github.com/repos/go-swagger/go-swagger/commits{/sha}","git_commits_url":"https://api.github.com/repos/go-swagger/go-swagger/git/commits{/sha}","comments_url":"https://api.github.com/repos/go-swagger/go-swagger/comments{/number}","issue_comment_url":"https://api.github.com/repos/go-swagger/go-swagger/issues/comments{/number}","contents_url":"https://api.github.com/repos/go-swagger/go-swagger/contents/{+path}","compare_url":"https://api.github.com/repos/go-swagger/go-swagger/compare/{base}...{head}","merges_url":"https://api.github.com/repos/go-swagger/go-swagger/merges","archive_url":"https://api.github.com/repos/go-swagger/go-swagger/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/go-swagger/go-swagger/downloads","issues_url":"https://api.github.com/repos/go-swagger/go-swagger/issues{/number}","pulls_url":"https://api.github.com/repos/go-swagger/go-swagger/pulls{/number}","milestones_url":"https://api.github.com/repos/go-swagger/go-swagger/milestones{/number}","notifications_url":"https://api.github.com/repos/go-swagger/go-swagger/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/go-swagger/go-swagger/labels{/name}","releases_url":"https://api.github.com/repos/go-swagger/go-swagger/releases{/id}","deployments_url":"https://api.github.com/repos/go-swagger/go-swagger/deployments","created_at":"2014-11-16T20:13:15Z","updated_at":"2018-06-22T17:13:14Z","pushed_at":"2018-06-23T08:10:28Z","git_url":"git://github.com/go-swagger/go-swagger.git","ssh_url":"git@github.com:go-swagger/go-swagger.git","clone_url":"https://github.com/go-swagger/go-swagger.git","svn_url":"https://github.com/go-swagger/go-swagger","homepage":"https://goswagger.io","size":44143,"stargazers_count":2387,"watchers_count":2387,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":437,"mirror_url":null,"archived":false,"open_issues_count":244,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":437,"open_issues":244,"watchers":2387,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/go-swagger/go-swagger/pulls/1589"},"html":{"href":"https://github.com/go-swagger/go-swagger/pull/1589"},"issue":{"href":"https://api.github.com/repos/go-swagger/go-swagger/issues/1589"},"comments":{"href":"https://api.github.com/repos/go-swagger/go-swagger/issues/1589/comments"},"review_comments":{"href":"https://api.github.com/repos/go-swagger/go-swagger/pulls/1589/comments"},"review_comment":{"href":"https://api.github.com/repos/go-swagger/go-swagger/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/go-swagger/go-swagger/pulls/1589/commits"},"statuses":{"href":"https://api.github.com/repos/go-swagger/go-swagger/statuses/1b3e277bf5aa47dd4ffaab1a317e441c5cfa99f8"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"gregmarr"}}