How to force v1.0 rather than render and accept v1 #1141
-
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
| This is covered by the Custom API Version Format Strings topic. From the example, you have set  The minor version is optionally when  options.GroupNameFormat = "'v'VV";The  | 
Beta Was this translation helpful? Give feedback.





You can't cause
1to be rejected, but1.0to be accepted out of the box. It might be possible through some configuration, but - honestly - it will probably be more trouble than it's worth. You can, however, have the URLs usev1.0overv1. This is almost the same configuration as before a la:Note that this format configuration does not use include the
'v'literal in the format. That's because you would have already included it in your route template; for example,[Route("api/v{version:apiVersion}/[controller]")]. This setting configures how the API version is formatted when it is substituted in the template, which is already enabl…