mulesoft-labs / node-raml-validate

Strict validation of RAML parameters in JavaScript
Other
17 stars 9 forks source link

[RAML 1.0] Validate incorrectly if property name is `type` #7

Open jhen0409 opened 7 years ago

jhen0409 commented 7 years ago

This just an issue I added the failed test case: (https://travis-ci.org/mulesoft-labs/node-raml-validate/jobs/254185210#L314)

Schema:

{
  type: {
    type: 'string',
    enum: ['email', 'password']
  }
}

Data:

{
  type: 'email'
}

Test result:

2017-07-17 12 45 49

I think this may because raml-typesystem use the type property as a type, this is expected.

pmuens commented 6 years ago

Any updates on this one? Facing the exact same issue...