swagger-parser
swagger-parser copied to clipboard
Enumeration values are not validated against the enum type
In the following specification myenum is supposed to be an integer-valued enumeration, but its enum property is a list of mixed types. Unexpectedly, the validator does not report any error.
swagger: '2.0'
info:
title: "bad api"
version: "1.0.0"
host: localhost
schemes:
- https
basePath: /path
paths:
"/main":
get:
responses:
200:
description: "Main entry point"
definitions:
myenum:
type: integer
enum:
- not an integer
- 2
Has this been resolved in latest version ?
Not yet, no. But a Pull Request is always welcome! Here is the file that would need to be edited.