swagger-cli
swagger-cli copied to clipboard
Validate does not detect missing field in required
Running with the validate command does not detect the case where the required field for a schema refers to a field that does not exist.
I had a model that looked like this.
components:
schemas:
Audit:
properties:
createDate:
type: string
required: [ createDate ]
The schema was valid. I then changed the name of a property but forgot to rename the field in the required list and it validated successfully anyway.
components:
schemas:
Audit:
properties:
createDateTime:
type: string
required: [ createDate ]
Got bitten by this bug, too.
Is anyone monitoring this…?
Stand by - there will be a pull request soon.