mulesoft / osprey

Generate Node.JS API middleware from a RAML definition
Other
431 stars 66 forks source link

osprey does not honor maxProperties #222

Open rohshall opened 3 years ago

rohshall commented 3 years ago

We have a POST body defined like this:

 - loginRequest: |
      {
        "$schema": "http://json-schema.org/draft-04/schema",
        "type": "object",
        "properties": {
          "userName": {
            "type": "string"
          },
          "email": {
            "type": "string",
            "pattern": "^[^@]+@[^@]+$"
          }
        },
        "minProperties": 1,
        "maxProperties": 1,
        "additionalProperties": true
      }

So, if we provide both userName and email, it should reject the request with 400. But, it does not.