Some schemas do not trigger semantic validation.
Looks like the schema selectors (allSchemas, isSubSchema, etc.) don't pick up everything.
https://github.com/swagger-api/swagger-editor/blob/master/src/plugins/validate-semantic/selectors.js
OAS2:
swagger: '2.0'
info:
title: Enum value validation against schema
version: 1.0.0
paths: {}
definitions:
Foo:
allOf:
- type: string
enum: [1] # should trigger warning
OAS3:
openapi: 3.0.0
info:
title: Enum value validation against schema
version: 1.0.0
paths: {}
components:
requestBodies:
fooBody:
content:
application/json:
schema:
type: string
enum: [1] # should trigger warning
headers:
fooHeader:
schema:
type: string
enum: [1] # should trigger warning
schemas:
Foo:
type: string
enum: [1] # should trigger warning
Foo2:
allOf: # also oneOf, anyOf
- type: string
enum: [1] # should trigger warning
@ralphdoe GitHub isn't letting me assign this to you, but this one's yours!
@shockey fixed! the assignment)