In Swagger a Parameter Object may contain enum which should match the same the parameter. For example, if I declare an array parameter which the items of the array would be strings. I would have an enumeration of arrays of strings which is permitted in specification. Any type MAY be inside the enum array [spec]:
Elements in the array MAY be of any type, including null.
While, I don't think it makes logical sense to do so. It is permitted in specification and I am seeing people do this in Swagger. Before this PR we was setting an elements content to an array which contained an array of primitive JavaScript types. Since an elements content can contain an array of elements, but not an array of primitive types the serialiser was failing for these documents. Correctly refracting the value would solve this problem.
In Swagger a Parameter Object may contain enum which should match the same the parameter. For example, if I declare an array parameter which the items of the array would be strings. I would have an enumeration of arrays of strings which is permitted in specification. Any type MAY be inside the enum array [spec]:
While, I don't think it makes logical sense to do so. It is permitted in specification and I am seeing people do this in Swagger. Before this PR we was setting an elements content to an array which contained an array of primitive JavaScript types. Since an elements content can contain an array of elements, but not an array of primitive types the serialiser was failing for these documents. Correctly refracting the value would solve this problem.