raml-org / raml-java-parser

(deprecated) A RAML parser based on SnakeYAML written in Java
Other
174 stars 121 forks source link

Strings "true" and "false" are valid for boolean type #678

Closed JuanAller closed 4 years ago

JuanAller commented 4 years ago

#%RAML 1.0 title: Sample API types: TestType: type: object properties: count?: integer flag?: boolean name?: string /test: post: body: application/json: type: TestType example: | { "count": 12, "flag": "false", "name": "Joe" } field "flag" is boolean type, but example value is "false"

eduardo-rubio commented 4 years ago

AMF fails also with strings "true" and "false". @jpbelang @jstoiko This issue should be solve using a property to prevent backward compatibility issues.

jpbelang commented 4 years ago

The org.raml.strict_booleans property was added to solve this issue.