{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/aspnet-api-versioning/issues/285","repository_url":"https://api.github.com/repos/Microsoft/aspnet-api-versioning","labels_url":"https://api.github.com/repos/Microsoft/aspnet-api-versioning/issues/285/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/aspnet-api-versioning/issues/285/comments","events_url":"https://api.github.com/repos/Microsoft/aspnet-api-versioning/issues/285/events","html_url":"https://github.com/Microsoft/aspnet-api-versioning/issues/285","id":316939836,"node_id":"MDU6SXNzdWUzMTY5Mzk4MzY=","number":285,"title":"Using AddVersionedApiExplorer() with AddMvc()","user":{"login":"memark","id":318504,"node_id":"MDQ6VXNlcjMxODUwNA==","avatar_url":"https://avatars1.githubusercontent.com/u/318504?v=4","gravatar_id":"","url":"https://api.github.com/users/memark","html_url":"https://github.com/memark","followers_url":"https://api.github.com/users/memark/followers","following_url":"https://api.github.com/users/memark/following{/other_user}","gists_url":"https://api.github.com/users/memark/gists{/gist_id}","starred_url":"https://api.github.com/users/memark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/memark/subscriptions","organizations_url":"https://api.github.com/users/memark/orgs","repos_url":"https://api.github.com/users/memark/repos","events_url":"https://api.github.com/users/memark/events{/privacy}","received_events_url":"https://api.github.com/users/memark/received_events","type":"User","site_admin":false},"labels":[{"id":593365604,"node_id":"MDU6TGFiZWw1OTMzNjU2MDQ=","url":"https://api.github.com/repos/Microsoft/aspnet-api-versioning/labels/ASP.NET%20Core","name":"ASP.NET Core","color":"5319e7","default":false},{"id":414438397,"node_id":"MDU6TGFiZWw0MTQ0MzgzOTc=","url":"https://api.github.com/repos/Microsoft/aspnet-api-versioning/labels/question","name":"question","color":"cc317c","default":true}],"state":"closed","locked":false,"assignee":{"login":"commonsensesoftware","id":11765008,"node_id":"MDQ6VXNlcjExNzY1MDA4","avatar_url":"https://avatars1.githubusercontent.com/u/11765008?v=4","gravatar_id":"","url":"https://api.github.com/users/commonsensesoftware","html_url":"https://github.com/commonsensesoftware","followers_url":"https://api.github.com/users/commonsensesoftware/followers","following_url":"https://api.github.com/users/commonsensesoftware/following{/other_user}","gists_url":"https://api.github.com/users/commonsensesoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/commonsensesoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/commonsensesoftware/subscriptions","organizations_url":"https://api.github.com/users/commonsensesoftware/orgs","repos_url":"https://api.github.com/users/commonsensesoftware/repos","events_url":"https://api.github.com/users/commonsensesoftware/events{/privacy}","received_events_url":"https://api.github.com/users/commonsensesoftware/received_events","type":"User","site_admin":false},"assignees":[{"login":"commonsensesoftware","id":11765008,"node_id":"MDQ6VXNlcjExNzY1MDA4","avatar_url":"https://avatars1.githubusercontent.com/u/11765008?v=4","gravatar_id":"","url":"https://api.github.com/users/commonsensesoftware","html_url":"https://github.com/commonsensesoftware","followers_url":"https://api.github.com/users/commonsensesoftware/followers","following_url":"https://api.github.com/users/commonsensesoftware/following{/other_user}","gists_url":"https://api.github.com/users/commonsensesoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/commonsensesoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/commonsensesoftware/subscriptions","organizations_url":"https://api.github.com/users/commonsensesoftware/orgs","repos_url":"https://api.github.com/users/commonsensesoftware/repos","events_url":"https://api.github.com/users/commonsensesoftware/events{/privacy}","received_events_url":"https://api.github.com/users/commonsensesoftware/received_events","type":"User","site_admin":false}],"milestone":null,"comments":9,"created_at":"2018-04-23T18:55:16Z","updated_at":"2018-06-21T16:40:02Z","closed_at":"2018-04-26T18:29:03Z","author_association":"NONE","body":"It seems the `AddVersionedApiExplorer()` call is always used together with `AddMvcCore()`. It does not seem to be available with the standard `AddMvc()` builder. Is this correct? Do I have to convert my application to use the `AddMvcCore()` builder instead if I want the versioned version?"},"comment":{"url":"https://api.github.com/repos/Microsoft/aspnet-api-versioning/issues/comments/399168010","html_url":"https://github.com/Microsoft/aspnet-api-versioning/issues/285#issuecomment-399168010","issue_url":"https://api.github.com/repos/Microsoft/aspnet-api-versioning/issues/285","id":399168010,"node_id":"MDEyOklzc3VlQ29tbWVudDM5OTE2ODAxMA==","user":{"login":"commonsensesoftware","id":11765008,"node_id":"MDQ6VXNlcjExNzY1MDA4","avatar_url":"https://avatars1.githubusercontent.com/u/11765008?v=4","gravatar_id":"","url":"https://api.github.com/users/commonsensesoftware","html_url":"https://github.com/commonsensesoftware","followers_url":"https://api.github.com/users/commonsensesoftware/followers","following_url":"https://api.github.com/users/commonsensesoftware/following{/other_user}","gists_url":"https://api.github.com/users/commonsensesoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/commonsensesoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/commonsensesoftware/subscriptions","organizations_url":"https://api.github.com/users/commonsensesoftware/orgs","repos_url":"https://api.github.com/users/commonsensesoftware/repos","events_url":"https://api.github.com/users/commonsensesoftware/events{/privacy}","received_events_url":"https://api.github.com/users/commonsensesoftware/received_events","type":"User","site_admin":false},"created_at":"2018-06-21T16:40:02Z","updated_at":"2018-06-21T16:40:02Z","author_association":"MEMBER","body":"Typically, the only options you're ever interested in for the API Explorer is:\r\n\r\n* GroupNameFormat\r\n* SubstitutionFormat (URL segment style only)\r\n* SubstituteApiVersionInUrl (URL segment style only)\r\n* DefaultApiVersionParameterDescription\r\n\r\n**GroupNameFormat** is generally the only thing you need to change from the out-of-the-box experience. If you're using the URL segment style, then most prefer **SubstituteApiVersionInUrl = true** as well. Everything else is choice, but is usually fine _as is_.\r\n\r\nI see the confusion. The API Explorer model in ASP.NET Core is quite different (and more robust) than it was in Web API. The default API Explorer actual discovers everything, but there is no organization to it. The API Versioning _provider_ runs at the end of the API Explorer pipeline and collates all the APIs into appropriate buckets by API version. Technically, `AddVersionedApiExplorer()` doesn't depend on `AddApiExplorer()`, but it also doesn't make sense without it so it probably should call `AddApiExplorer()` on your behalf. I'll consider adding that to the 3.0 work in progress.\r\n\r\nYour suggestion is valid, but - unfortunately - I find a lot of people mixing and matching API versioning with UIs. I don't know why anyone needs API versioning if you own both the UI and API in the same application, but I see it quite often. For that reason, the current example should probably stay _as is_. It's useful for those mixing in with the full MVC stack and I use the samples quite often as the basis of for troubleshooting.\r\n\r\nThat said, I'm not at all opposed to an entirely new sample. Perhaps something called _ApiOnlySample_ that has the setup you are describing. The controllers will need to change their base type to **ControllerBase** instead of **Controller** as well. There may be other changes required too, but that's what I can think of off the top of my head."}}
{"actor":{"display_login":"commonsensesoftware"}}