{"action":"created","issue":{"url":"https://api.github.com/repos/api-platform/core/issues/1742","repository_url":"https://api.github.com/repos/api-platform/core","labels_url":"https://api.github.com/repos/api-platform/core/issues/1742/labels{/name}","comments_url":"https://api.github.com/repos/api-platform/core/issues/1742/comments","events_url":"https://api.github.com/repos/api-platform/core/issues/1742/events","html_url":"https://github.com/api-platform/core/pull/1742","id":301573395,"number":1742,"title":"Strip slashes from definitionKey","user":{"login":"silverbackdan","id":25174262,"avatar_url":"https://avatars0.githubusercontent.com/u/25174262?v=4","gravatar_id":"","url":"https://api.github.com/users/silverbackdan","html_url":"https://github.com/silverbackdan","followers_url":"https://api.github.com/users/silverbackdan/followers","following_url":"https://api.github.com/users/silverbackdan/following{/other_user}","gists_url":"https://api.github.com/users/silverbackdan/gists{/gist_id}","starred_url":"https://api.github.com/users/silverbackdan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/silverbackdan/subscriptions","organizations_url":"https://api.github.com/users/silverbackdan/orgs","repos_url":"https://api.github.com/users/silverbackdan/repos","events_url":"https://api.github.com/users/silverbackdan/events{/privacy}","received_events_url":"https://api.github.com/users/silverbackdan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-03-01T21:53:10Z","updated_at":"2018-04-06T14:05:11Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/api-platform/core/pulls/1742","html_url":"https://github.com/api-platform/core/pull/1742","diff_url":"https://github.com/api-platform/core/pull/1742.diff","patch_url":"https://github.com/api-platform/core/pull/1742.patch"},"body":"To allow shortNames with slashes and avoid swagger ui resolver error\r\n\r\n| Q             | A\r\n| ------------- | ---\r\n| Bug fix?      | yes\r\n| New feature?  | no\r\n| BC breaks?    | no\r\n| Deprecations? | no\r\n| Tests pass?   | yes\r\n| Fixed tickets | n/a\r\n| License       | MIT\r\n| Doc PR        | n/a\r\n\r\nI'd like to update some resource's short names to include a prefix - e.g. component/hero instead of just hero.\r\n\r\nIt seemed the simplest way I found in previous issues was to change the short name. It works well except in the swagger ui which results in a Resolver error where it cannot resolve the reference if it has another slash in it.\r\n\r\nThe easiest fix I could think would be to strip the slashes as I've done in this PR.\r\n\r\nAlternatively I'd look to tag each resource to group them together is they are an instance on AbstractComponent in my case. But tagging doesn't seem so easy to do dynamically at the moment, even with the DocumentationNormalizer.\r\n\r\nHappy for feedback if there's a better solution though. I'd personally quite like a 'route_prefix' option instead but I'm not sure how useful it'd be for others."},"comment":{"url":"https://api.github.com/repos/api-platform/core/issues/comments/379263598","html_url":"https://github.com/api-platform/core/pull/1742#issuecomment-379263598","issue_url":"https://api.github.com/repos/api-platform/core/issues/1742","id":379263598,"user":{"login":"Simperfit","id":3451634,"avatar_url":"https://avatars1.githubusercontent.com/u/3451634?v=4","gravatar_id":"","url":"https://api.github.com/users/Simperfit","html_url":"https://github.com/Simperfit","followers_url":"https://api.github.com/users/Simperfit/followers","following_url":"https://api.github.com/users/Simperfit/following{/other_user}","gists_url":"https://api.github.com/users/Simperfit/gists{/gist_id}","starred_url":"https://api.github.com/users/Simperfit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Simperfit/subscriptions","organizations_url":"https://api.github.com/users/Simperfit/orgs","repos_url":"https://api.github.com/users/Simperfit/repos","events_url":"https://api.github.com/users/Simperfit/events{/privacy}","received_events_url":"https://api.github.com/users/Simperfit/received_events","type":"User","site_admin":false},"created_at":"2018-04-06T14:05:11Z","updated_at":"2018-04-06T14:05:11Z","author_association":"MEMBER","body":"I guess the tag feature will be better, could you take care of this ? I'm closing this one, it seems not the right fix to me too."}}
{"actor":{"display_login":"Simperfit"}}