-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Incorrectly showing V1 in Swagger when explicitly removed from a verson, and changing the start version.
e.g. only v2 and v3 should be accessable
services.AddApiVersioning(options =>
{
options.Conventions = new IntroducedApiVersionConventionBuilder(2, 3);
options.ReportApiVersions = true;
});
services.AddVersionedApiExplorer(
options =>
{
options.GroupNameFormat = "'v'VVV";
options.SubstituteApiVersionInUrl = true;
});But this is showing as V1 still
[ApiController]
[Route("api/v{api-version:apiVersion}/events/{eventId}/media")]
[IntroducedInApiVersion(1)]
[RemovedAsOfApiVersion(2)]
[ResponseCache(CacheProfileName = CacheProfileNames.None)]
public class MediaController : Controller
{
private readonly IMediaService _mediaService;
public MediaController(IMediaService mediaService)
{
_mediaService = mediaService;
}
[HttpGet]
public async Task<ActionResult<MediaV1[]>> Get(string eventId)
{
var media = (await _mediaService.GetForEventAsync(eventId))
.Select(m => MediaV1.MapFrom(m, true, false))
.ToArray();
return media;
}
}Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working