How to define a JSON array with concrete item definition for every index (i.e. a tuple) in OpenAPI?
问题 I need to define in OpenAPI a JSON response with an array. The array always contains 2 items and the first one is always a number and second one is always a string. [1, "a"] //valid ["a", 1] //invalid [1] //invalid [1, "a", 2] //invalid I've found out that JSON schema does support that by passing a list of items in items instead of single object (source), but OpenAPI explicitly forbids that and accepts only a single object (source). How can that be expressed in OpenAPI? 回答1: OpenAPI 3.1