1
I created a WebApiwith basic methods intended to use the Swagger. I noticed that methods that have simple parameters like the one illustrated in the code below are displayed by Swagger but methods that have some vector, this is deleted. I tried to change the SwaggerConfig.cs defining a MapType as follows c.MapType<string[]>(() => new Schema { type = "string[]", format = "string[]" });but without success. In the project configuration file the option XML documentation file existing within the tab Build is selected what is generating the documentation XML file.
Method listed in Swagger
// GET: api/Default
public IEnumerable<string> Get()
{
return new string[] { "value1", "value2" };
}
Method that is not listed in Swagger
// GET: api/Get/paramstring
public IEnumerable<string> GetArray(string[] paramstring)
{
return new string[] { "value1", "value2" };
}
Version of Swagger 8.3.44.1;
Version of . Net 4.6.1
From a look here https://stackoverflow.com/questions/39281532/specify-an-array-of-strings-as-body-parameter-in-swagger-api
– rysahara
Where did you get that version of Swagger?
– Leandro Angelo
@LeandroAngelo https://www.nuget.org/packages/Swagger-Net/
– JcSaint