raml-org/raml-java-parser

Validating floats that are equivalent to integers should work

jpbelang opened this issue · 0 comments

There is a difference in behavior between the Java Parser for RAML 1.0 and the other parsers of the platform (Java RAML 0.8 Parser, Javascript Parser, and AMF) validating decimals with ".0" as integers (e.g.: 1.0, 12.00).

They should be validated so that this is valid:

#%RAML 1.0
title: API with Examples
types:
 User:
   type: object
   properties:
     name:
       type: string
     age:
       type: integer
     height:
       type: number
       format: double
   examples:
     ok:
         name: tato
         age: 77
         height: 1.47
     still-ok:
       name: tato
       age: 77.0
       height: 1.47