EndpointSpecificExample example is not working. I have 2 example responses for the string datatype. It shows both examples even after filtering with EndpointSepcificExample.
[ExampleAnnotation(Name = "RoadId", ExampleType = ExampleType.Response)]
public class StringResponseRoadIdExample : IExampleProvider<string>
{
public string GetExample() => "acf3e9de-h32e-468c-9xe3-f6477wtke2bd";
}
[ExampleAnnotation(Name = "BadRequest", ExampleType = ExampleType.Response)]
public class StringResponseBadRequestExample : IExampleProvider<string>
{
public string GetExample() => "BadRequest";
}
and in the controller i have the attribute as specified in the document.
[ProducesResponseType(StatusCodes.Status201Created, Type = typeof(string))]
[ProducesResponseType(StatusCodes.Status400BadRequest, Type = typeof(string))]
[EndpointSpecificExample(typeof(StringResponseRoadIdExample ), ExampleType = ExampleType.Response, ResponseStatusCode = StatusCodes.Status201Created)]
[EndpointSpecificExample(typeof(StringResponseBadRequestExample ), ExampleType = ExampleType.Response, ResponseStatusCode = StatusCodes.Status400BadRequest)]
public async Task<IActionResult> CreateRoadAsync()
EndpointSpecificExample example is not working. I have 2 example responses for the string datatype. It shows both examples even after filtering with EndpointSepcificExample.
and in the controller i have the attribute as specified in the document.