{"action":"created","issue":{"url":"https://api.github.com/repos/timothycrosley/hug/issues/459","repository_url":"https://api.github.com/repos/timothycrosley/hug","labels_url":"https://api.github.com/repos/timothycrosley/hug/issues/459/labels{/name}","comments_url":"https://api.github.com/repos/timothycrosley/hug/issues/459/comments","events_url":"https://api.github.com/repos/timothycrosley/hug/issues/459/events","html_url":"https://github.com/timothycrosley/hug/issues/459","id":209136308,"number":459,"title":"interface examples don't work with formatted urls","user":{"login":"davidhyman","id":5198267,"avatar_url":"https://avatars.githubusercontent.com/u/5198267?v=3","gravatar_id":"","url":"https://api.github.com/users/davidhyman","html_url":"https://github.com/davidhyman","followers_url":"https://api.github.com/users/davidhyman/followers","following_url":"https://api.github.com/users/davidhyman/following{/other_user}","gists_url":"https://api.github.com/users/davidhyman/gists{/gist_id}","starred_url":"https://api.github.com/users/davidhyman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidhyman/subscriptions","organizations_url":"https://api.github.com/users/davidhyman/orgs","repos_url":"https://api.github.com/users/davidhyman/repos","events_url":"https://api.github.com/users/davidhyman/events{/privacy}","received_events_url":"https://api.github.com/users/davidhyman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-02-21T12:51:26Z","updated_at":"2017-02-21T14:08:23Z","closed_at":null,"body":"If I have a templated url like `/objects/{id}` it's impossible to build examples demonstrating the usage of it without query parameters.\r\n\r\nI think it would be a simple case of another `isinstance` and unpacking example dictionaries or something in the doc generator. Can try for a PR if that is useful.\r\n`hug.interface.HTTP#documentation`"},"comment":{"url":"https://api.github.com/repos/timothycrosley/hug/issues/comments/281353754","html_url":"https://github.com/timothycrosley/hug/issues/459#issuecomment-281353754","issue_url":"https://api.github.com/repos/timothycrosley/hug/issues/459","id":281353754,"user":{"login":"davidhyman","id":5198267,"avatar_url":"https://avatars.githubusercontent.com/u/5198267?v=3","gravatar_id":"","url":"https://api.github.com/users/davidhyman","html_url":"https://github.com/davidhyman","followers_url":"https://api.github.com/users/davidhyman/followers","following_url":"https://api.github.com/users/davidhyman/following{/other_user}","gists_url":"https://api.github.com/users/davidhyman/gists{/gist_id}","starred_url":"https://api.github.com/users/davidhyman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidhyman/subscriptions","organizations_url":"https://api.github.com/users/davidhyman/orgs","repos_url":"https://api.github.com/users/davidhyman/repos","events_url":"https://api.github.com/users/davidhyman/events{/privacy}","received_events_url":"https://api.github.com/users/davidhyman/received_events","type":"User","site_admin":false},"created_at":"2017-02-21T14:08:23Z","updated_at":"2017-02-21T14:08:23Z","body":"Actually, not 'impossible' ... one can do `examples=[True]` or some other thing that isn't a `str` to force inclusion of an example url. Bit dodgy though, would be good to be able to provide it generically with example kwargs dicts and have it figure it out for itself. Guess there's diminishing returns without building an entire OpenAPI spec.\r\n\r\nWithout the example url, the self-documenting API doesn't provide valid paths as it excludes API versions. Maybe this is worth a separate ticket but perhaps the code from the interface docs \r\n```python\r\n\"{0}{1}{2}\".format(base_url, '/v{0}'.format(version) if version else '', url)\r\n```\r\ncould be reused here when describing the full path of an endpoint: `hug/api.py:225`\r\n\r\n(this is all on hug 2.2.0, for reference)"}}
{"actor":{"display_login":"davidhyman"}}