swagger-parser
swagger-parser copied to clipboard
Validate null value in enums
Incorrect YAML
EnumObject:
type: string
enum:
- NULL
- ITEM1
- ITEM2
Correct YAML
EnumObject:
type: string
enum:
- 'NULL'
- ITEM1
- ITEM2
Issue: There are warnings if using the incorrect YAML in SwaggerHub, but swagger-cli said the document is valid.
Warnings from SwaggerHub: enum value should conform to its schema's type
Expect result: Same warning as SwaggerHub.
If you want a really really good validator then give Spectral a go. I helped make it, it does loooooooads of stuff and has far more active development being done.
Otherwise, a PR for this would be appreciated. :D