cyprieng / swagger-parser

Give useful informations about your swagger files
MIT License
62 stars 59 forks source link

AttributeError exception in _example_from_array_spec() when items specified as array of types #44

Closed mtherieau closed 7 years ago

mtherieau commented 7 years ago

in cases when an array's items are specified in so-called "tuple mode", _example_from_array_spec() throws at AttributeError exception like so: https://travis-ci.org/Trax-air/swagger-parser/jobs/214411452#L878

reference: so-called "tuple validation" https://spacetelescope.github.io/understanding-json-schema/reference/array.html

Test case added in: https://github.com/Trax-air/swagger-parser/pull/39 an example of this issue is in file: tests/array_items_list.yaml

fix is part of same PR here: https://github.com/Trax-air/swagger-parser/pull/39/commits/1569e296aba00fa97ddbbb19877faf84c71bf348