0 gives syntax error 'number is expected'


#1

Hello,

For an endpoint I define the GET 200 response like this:

  200:
        body:
          application/json:
            type: array
            items:
              type: object
              properties:
                traitsExponent: number #<=== number
            example:
              [{
               "traitsExponent": 1.5, <== value can also be 0
            },{

If key ‘traitsExponent’ has the value ‘0’ (without the ‘’) I get a syntax error ‘number is expected’. When I change the definition from ‘number’ to ‘integer’ (weird since this is a subste of number) I still get syntax error ‘number is expected’. Is 0 not a numbr???
I get this in the Atom Api workbench editor and in the online Api workbench tool. Raml version 1.0


#2

Are you sure that it is not working? The following works perfectly fine

types:
  Test:
    type: array
    items:
      type: object
      properties:
        traitsExponent: number #<=== number
    example: |
      [{
        "traitsExponent": 0
      }]