- 
                Notifications
    
You must be signed in to change notification settings  - Fork 166
 
Open
Labels
Description
Versions
- Node.js: 
8.12.0 - swagger-parser: 
6.0.2 
Code example
API specification:
openapi: '3.0.2'
info:
  version: v1
  title: test
paths:
  /:
    post:
      requestBody:
        required: true
        content:
          'application/json':
            schema:
              type: object
              properties:
                foo:
                  type: string
              required:
                - foo
                - bar # This property is not defined!
              additionalProperties: false
      responses:
        200:
          description: Successconst SwaggerParser = require('swagger-parser');
SwaggerParser.validate('api.yml')
  .then((api) => console.log('done'))
  .catch((err) => console.error(err));Expected behavior
Validation error: property bar is required, but it's not defined.
Actual behavior
No errors.