Swagger 2.0 not validating for empty string

Viewed 1585

I am using swagger 2.0 I have a definition like this

definitions:
  User:
    required:
      - name
      - skills
     
    properties:
      name:
        description: 'Donald Smith'
        type: string
      skills:
        type: array
        items:
          type: string
          minLength: 1

name and skills are required it can accept only strings, however I am trying to validate for empty string, basically name should not be empty and skills array should contain atleast one string value. However swagger is not validating by default I tried to use the pattern '^[a-zA-Z ]+$' for name and minLength for array but it does not work out.

0 Answers
Related