Skip to content

Commit

Permalink
Fix usage of "not"
Browse files Browse the repository at this point in the history
Constructs such as:

type: object
not:
  type: object

will always fail, so remove the type inside the not.

The "not" usage around "^x-" patterns for responses is
unnecessary, as the existing

patternProperties:
    "[1-5]..."
additionalProperties: false

prevents all property that do not start with 1, 2, 3, 4, or 5
from being allowed already.
  • Loading branch information
handrews committed Nov 8, 2018
1 parent 1087db4 commit 13a4fd2
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions schemas/v3.0/schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -666,14 +666,8 @@ definitions:
oneOf:
- $ref: '#/definitions/Response'
- $ref: '#/definitions/Reference'
'^x-': {}
minProperties: 1
additionalProperties: false
not:
type: object
patternProperties:
'^x-': {}
additionalProperties: false


SecurityRequirement:
Expand Down Expand Up @@ -1250,20 +1244,16 @@ definitions:
- $ref: '#/definitions/BearerHTTPSecurityScheme'

NonBearerHTTPSecurityScheme:
not:
type: object
properties:
scheme:
type: string
enum:
- bearer
type: object
required:
- scheme
- type
properties:
scheme:
type: string
not:
enum:
- bearer
description:
type: string
type:
Expand Down

0 comments on commit 13a4fd2

Please sign in to comment.