swagger-routes icon indicating copy to clipboard operation
swagger-routes copied to clipboard

Attempt to convert collectionFormat list items so that they validate correctly.

Open jamidon opened this issue 3 years ago • 1 comments

Convert collectionFormat lists to the specified type so that jsonschema validates correctly. For example, a parameter type such as this:

idcsv: {name: ids, description: 'list of IDs', in: query, type: array, items: {type: number, format: int32}, collectionFormat: csv, minItems: 1}

The existing code simply returns a list of strings, however, jsonschema won't validate correctly unless the items are first converted to integers.

jamidon avatar Sep 05 '20 21:09 jamidon