Skip to content

ApiExplorer migration #972

Discussion options

You must be logged in to vote

Good question. There is now IApiVersioningBuilder that all subsequent configurations and services hang off of. The idea was to centralize everything API Versioning via one builder. Previously, there were several different configuration paths.

You have the correct package. The setup should now be:

builder.Services.AddApiVersioning()
                .AddApiExplorer(options => GroupNameFormat = "'v'VVV");

This configuration will implicitly imply:

builder.Services.AddApiVersioning()
                .AddMvc() // ← adds MVC Core with versioning support for controllers
                .AddApiExplorer(options => GroupNameFormat = "'v'VVV");

With the introduction of Minimal APIs, AddApiVersioning()

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@bsalmeida
Comment options

@commonsensesoftware
Comment options

Answer selected by bsalmeida
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants