RAML Type Number is getting valid even if passed in String


#1

Hi All,
I saw this issue while coding.
I have RAML

#%RAML 1.0 DataType

properties:
   
  age:
    type: number
    required: false
  citizenship:
    type: string
    required: false
  height2:
    type: number
    required: false
  weight2:
    type: number
    required: false
  nonResidentAlienInd:
    type: string
    required: false

Following Input gives success scenario:
“age” : “23.09”
“age” : 2

When i give below input it fails:
“age” : “ABC23.09”
“age” : ABC123

The thing here is , though “age” : “23.09” is given within string, it passes.
But i need it to be failed .
any help on this?


#2

What server(?) is giving you this problem?
There are many frameworks using RAML, surely not all have the same issue. :slight_smile:


#3

It’s the Mule server Mule 4.1 version