Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. public static class ApiVersionAddExtensionHandler
  2. {
  3. public static IServiceCollection AddApiVersionHandler(this IServiceCollection services)
  4. {
  5.  
  6. services.AddApiVersioning(options => options.ReportApiVersions = true);
  7. services.AddVersionedApiExplorer(
  8. options =>
  9. {
  10. options.GroupNameFormat = "'v'VVV";
  11. options.SubstituteApiVersionInUrl = true;
  12. });
  13.  
  14. return services;
  15. }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement