Closed ghost closed 9 years ago
Properties in responses that are missing in the raml-schemas does not result in errors in the RamlReport. Example response:
{ "id": 9706 "name": "Bob" }
With raml:
schema: | { "properties": { "id": { "type": "integer" } }, "type": "object" }
Should result in a validation error I think.
Also, properties in schemas which does not exist in the response are validated as OK. Example response:
{ "id": 9706 }
Example raml:
responses: 200: body: schema: | { "properties": { "name": { "type": "string" }, "id": { "type": "integer" } }, "type": "object" }
These are JSON schema issues. To get the desired result, add
additionalProperties:false required:["name","id"]
see http://spacetelescope.github.io/understanding-json-schema/reference/object.html
Properties in responses that are missing in the raml-schemas does not result in errors in the RamlReport. Example response:
With raml:
Should result in a validation error I think.
Also, properties in schemas which does not exist in the response are validated as OK. Example response:
Example raml: