routing-controllers-openapi icon indicating copy to clipboard operation
routing-controllers-openapi copied to clipboard

How to describe a response with array of strings?

Open yuvalt opened this issue 4 years ago • 0 comments

I need to return an array of strings. Is there something similar to @ResponseSchema that accepts basic types? I'm looking for this type of output:

  @OpenAPI({
    summary: 'Returns a list of countries',
    responses: {
      '200': {
        content: {
          'application/json': {
            'schema': {
              'type': 'array',
              'items': {
                'type': 'string'
              }
            }
          }
        }
      }
    }
  })

yuvalt avatar Feb 07 '22 05:02 yuvalt