{"action":"created","issue":{"url":"https://api.github.com/repos/Rebilly/ReDoc/issues/309","repository_url":"https://api.github.com/repos/Rebilly/ReDoc","labels_url":"https://api.github.com/repos/Rebilly/ReDoc/issues/309/labels{/name}","comments_url":"https://api.github.com/repos/Rebilly/ReDoc/issues/309/comments","events_url":"https://api.github.com/repos/Rebilly/ReDoc/issues/309/events","html_url":"https://github.com/Rebilly/ReDoc/issues/309","id":245424039,"number":309,"title":"How best to add code examples","user":{"login":"potemkin17","id":28263070,"avatar_url":"https://avatars2.githubusercontent.com/u/28263070?v=4","gravatar_id":"","url":"https://api.github.com/users/potemkin17","html_url":"https://github.com/potemkin17","followers_url":"https://api.github.com/users/potemkin17/followers","following_url":"https://api.github.com/users/potemkin17/following{/other_user}","gists_url":"https://api.github.com/users/potemkin17/gists{/gist_id}","starred_url":"https://api.github.com/users/potemkin17/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/potemkin17/subscriptions","organizations_url":"https://api.github.com/users/potemkin17/orgs","repos_url":"https://api.github.com/users/potemkin17/repos","events_url":"https://api.github.com/users/potemkin17/events{/privacy}","received_events_url":"https://api.github.com/users/potemkin17/received_events","type":"User","site_admin":false},"labels":[{"id":496279693,"url":"https://api.github.com/repos/Rebilly/ReDoc/labels/Add%20to%20FAQ","name":"Add to FAQ","color":"d4c5f9","default":false},{"id":280076754,"url":"https://api.github.com/repos/Rebilly/ReDoc/labels/question","name":"question","color":"cc317c","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-07-25T14:39:16Z","updated_at":"2017-08-17T07:37:04Z","closed_at":"2017-08-17T07:37:04Z","body":"It would be great if someone could explain how best to add python, js and java examples to ReDoc. What is the best way to generate them automatically based on the API endpoints. \r\n\r\nThanks a lot! "},"comment":{"url":"https://api.github.com/repos/Rebilly/ReDoc/issues/comments/322993175","html_url":"https://github.com/Rebilly/ReDoc/issues/309#issuecomment-322993175","issue_url":"https://api.github.com/repos/Rebilly/ReDoc/issues/309","id":322993175,"user":{"login":"RomanGotsiy","id":3975738,"avatar_url":"https://avatars0.githubusercontent.com/u/3975738?v=4","gravatar_id":"","url":"https://api.github.com/users/RomanGotsiy","html_url":"https://github.com/RomanGotsiy","followers_url":"https://api.github.com/users/RomanGotsiy/followers","following_url":"https://api.github.com/users/RomanGotsiy/following{/other_user}","gists_url":"https://api.github.com/users/RomanGotsiy/gists{/gist_id}","starred_url":"https://api.github.com/users/RomanGotsiy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RomanGotsiy/subscriptions","organizations_url":"https://api.github.com/users/RomanGotsiy/orgs","repos_url":"https://api.github.com/users/RomanGotsiy/repos","events_url":"https://api.github.com/users/RomanGotsiy/events{/privacy}","received_events_url":"https://api.github.com/users/RomanGotsiy/received_events","type":"User","site_admin":false},"created_at":"2017-08-17T07:37:04Z","updated_at":"2017-08-17T07:37:04Z","body":"@potemkin17 ReDoc doesn't support generating samples automatically. It just can render them.\r\nAs @Robinyo mentioned you can store each sample in a separate file and use scripts to bundle them into spec. We have yeoman generator for this. It will setup a repository with all the scripts ready. Check it out: https://github.com/Rebilly/generator-openapi-repo\r\n\r\nClosing this issue.\r\nfeel free to continues conversation here though"}}
{"actor":{"display_login":"RomanGotsiy"}}