{"action":"created","issue":{"url":"https://api.github.com/repos/domaindrivendev/Swashbuckle.AspNetCore/issues/507","repository_url":"https://api.github.com/repos/domaindrivendev/Swashbuckle.AspNetCore","labels_url":"https://api.github.com/repos/domaindrivendev/Swashbuckle.AspNetCore/issues/507/labels{/name}","comments_url":"https://api.github.com/repos/domaindrivendev/Swashbuckle.AspNetCore/issues/507/comments","events_url":"https://api.github.com/repos/domaindrivendev/Swashbuckle.AspNetCore/issues/507/events","html_url":"https://github.com/domaindrivendev/Swashbuckle.AspNetCore/issues/507","id":263489308,"number":507,"title":"30 minutes lost because of misleading intellisense (Unknown Swagger document - v1)","user":{"login":"JCKodel","id":379339,"avatar_url":"https://avatars0.githubusercontent.com/u/379339?v=4","gravatar_id":"","url":"https://api.github.com/users/JCKodel","html_url":"https://github.com/JCKodel","followers_url":"https://api.github.com/users/JCKodel/followers","following_url":"https://api.github.com/users/JCKodel/following{/other_user}","gists_url":"https://api.github.com/users/JCKodel/gists{/gist_id}","starred_url":"https://api.github.com/users/JCKodel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JCKodel/subscriptions","organizations_url":"https://api.github.com/users/JCKodel/orgs","repos_url":"https://api.github.com/users/JCKodel/repos","events_url":"https://api.github.com/users/JCKodel/events{/privacy}","received_events_url":"https://api.github.com/users/JCKodel/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-10-06T15:42:31Z","updated_at":"2017-10-07T00:52:25Z","closed_at":"2017-10-07T00:52:25Z","author_association":"NONE","body":"When running, I was getting a Unknown document exception, and I couldn't find why =(\r\n\r\nThen, I saw another issue (non related) and the OP gave a github link of his project, then I figured out where I did wrong:\r\n\r\n![image](https://user-images.githubusercontent.com/379339/31286010-43bcee62-aa93-11e7-8d79-534ba95aa3c6.png)\r\n\r\nNotice the intellisense ask me for NAME, but what it really wants is a VERSION!\r\n\r\nJust change the argument name from `name` to `version` and correct the description from `A URI-friendly name that uniquely identifies the document` to `A URI-friendly version info (i.e. v1) that uniquely identifies the document`.\r\n\r\nLink all those parts where versioning is used on documentation:\r\n\r\n1) On services.AddSwaggerGen => SwaggerDoc(\"HERE\")\r\n2) On app.UseSwaggerUI => SwaggerEndpoint(\"/swagger/HERE/swagger.json\", \"Title\")\r\n3) On every controller in attribute [ApiExplorerSettings(GroupName = \"HERE\")]"},"comment":{"url":"https://api.github.com/repos/domaindrivendev/Swashbuckle.AspNetCore/issues/comments/334899429","html_url":"https://github.com/domaindrivendev/Swashbuckle.AspNetCore/issues/507#issuecomment-334899429","issue_url":"https://api.github.com/repos/domaindrivendev/Swashbuckle.AspNetCore/issues/507","id":334899429,"user":{"login":"domaindrivendev","id":1434343,"avatar_url":"https://avatars1.githubusercontent.com/u/1434343?v=4","gravatar_id":"","url":"https://api.github.com/users/domaindrivendev","html_url":"https://github.com/domaindrivendev","followers_url":"https://api.github.com/users/domaindrivendev/followers","following_url":"https://api.github.com/users/domaindrivendev/following{/other_user}","gists_url":"https://api.github.com/users/domaindrivendev/gists{/gist_id}","starred_url":"https://api.github.com/users/domaindrivendev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/domaindrivendev/subscriptions","organizations_url":"https://api.github.com/users/domaindrivendev/orgs","repos_url":"https://api.github.com/users/domaindrivendev/repos","events_url":"https://api.github.com/users/domaindrivendev/events{/privacy}","received_events_url":"https://api.github.com/users/domaindrivendev/received_events","type":"User","site_admin":false},"created_at":"2017-10-07T00:52:25Z","updated_at":"2017-10-07T00:52:25Z","author_association":"OWNER","body":"Firstly, learn the appropriate etiquette for contributing feedback to an OSS project. For example, don't moan about losing 30 mins in the title and instead consider the fact that the author has literally put thousands of personal hours into providing you with this extremely helpful tool at no charge.\r\n\r\nSecondly, you're incorrect. The \"name\" parameter is referring to the name of the Swagger document, and NOT the version. One common use case is to name the document based on the version of the API it describes. However, you might also have logically separate services hosted by the same ASP.NET core app and in that case you may choose to create separate Swagger documents for each one. As an example ...\r\n\r\n```csharp\r\nc.SwaggerDoc(\"Products API\", productsApiInfo)\r\nc.SwaggerDoc(\"Orders API\", productsApiInfo)\r\n```\r\n\r\nSo, name CAN correlate to version but doesn't have to. Calling the parameter \"version\" would be over-specifying. It's a \"Swagger document\" that contains arbitrarily grouped operation descriptions. Focus on the document abstraction, version is just one use-case.\r\n\r\n\r\n"}}
{"actor":{"display_login":"domaindrivendev"}}