{"action":"created","issue":{"url":"https://api.github.com/repos/api-platform/core/issues/613","repository_url":"https://api.github.com/repos/api-platform/core","labels_url":"https://api.github.com/repos/api-platform/core/issues/613/labels{/name}","comments_url":"https://api.github.com/repos/api-platform/core/issues/613/comments","events_url":"https://api.github.com/repos/api-platform/core/issues/613/events","html_url":"https://github.com/api-platform/core/pull/613","id":165302310,"number":613,"title":"Reset operations for each resource class and remove api prefix to mak…","user":{"login":"samvdb","id":632452,"avatar_url":"https://avatars.githubusercontent.com/u/632452?v=3","gravatar_id":"","url":"https://api.github.com/users/samvdb","html_url":"https://github.com/samvdb","followers_url":"https://api.github.com/users/samvdb/followers","following_url":"https://api.github.com/users/samvdb/following{/other_user}","gists_url":"https://api.github.com/users/samvdb/gists{/gist_id}","starred_url":"https://api.github.com/users/samvdb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samvdb/subscriptions","organizations_url":"https://api.github.com/users/samvdb/orgs","repos_url":"https://api.github.com/users/samvdb/repos","events_url":"https://api.github.com/users/samvdb/events{/privacy}","received_events_url":"https://api.github.com/users/samvdb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-07-13T11:52:25Z","updated_at":"2016-07-14T08:23:52Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/api-platform/core/pulls/613","html_url":"https://github.com/api-platform/core/pull/613","diff_url":"https://github.com/api-platform/core/pull/613.diff","patch_url":"https://github.com/api-platform/core/pull/613.patch"},"body":"| 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 | \r\n| License       | MIT\r\n| Doc PR        | \r\n\r\nThis PR fixes a problem where the generated swagger output was wrong because some resources got tagged incorrectly.\r\n\r\nExample:\r\n\r\n$operation['item'] and $operation['collection'] are not empty and the next resource has no collection operations defined in it's annotation. Only $operation['item'] will be overriden and thus the swagger documentation would contain output from the previous resource in its collection array.\r\n\r\nWhen prefixing the annotation platform resources like this:\r\n\r\n```xml\r\n<import resource=\".\" type=\"api_platform\" prefix=\"/api\"/>\r\n```\r\n\r\nGenerated paths in swagger will look like /api/foo and the basepath will be /api for the hydra doc route.\r\nSwagger javascript will construct the url to call like this: /api/api/foo which is invalid.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/api-platform/core/issues/comments/232598513","html_url":"https://github.com/api-platform/core/pull/613#issuecomment-232598513","issue_url":"https://api.github.com/repos/api-platform/core/issues/613","id":232598513,"user":{"login":"dunglas","id":57224,"avatar_url":"https://avatars.githubusercontent.com/u/57224?v=3","gravatar_id":"","url":"https://api.github.com/users/dunglas","html_url":"https://github.com/dunglas","followers_url":"https://api.github.com/users/dunglas/followers","following_url":"https://api.github.com/users/dunglas/following{/other_user}","gists_url":"https://api.github.com/users/dunglas/gists{/gist_id}","starred_url":"https://api.github.com/users/dunglas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dunglas/subscriptions","organizations_url":"https://api.github.com/users/dunglas/orgs","repos_url":"https://api.github.com/users/dunglas/repos","events_url":"https://api.github.com/users/dunglas/events{/privacy}","received_events_url":"https://api.github.com/users/dunglas/received_events","type":"User","site_admin":false},"created_at":"2016-07-14T08:23:52Z","updated_at":"2016-07-14T08:23:52Z","body":"@samvdb The Swagger file generated after your patch isn't valid anymore.\r\n\r\n1. Install the Swagger validator: `npm install -g swagger-cli`\r\n2. Then  generate the Swagger file of the test app by running:`tests/Fixtures/app/console api:swagger:export > swagger.json`\r\n3. Finally run `swagger validate swagger.json` to validate the generate file and debug\r\n"}}
{"actor":{"display_login":"dunglas"}}