Skip to content

Commit

Permalink
use switch to intelligently identify inline vs referenced content (…
Browse files Browse the repository at this point in the history
  • Loading branch information
shockey committed Apr 17, 2019
1 parent 85bd1c8 commit f1f7551
Showing 1 changed file with 30 additions and 23 deletions.
53 changes: 30 additions & 23 deletions src/plugins/json-schema-validator/oas3-schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -519,9 +519,16 @@ definitions:
parameters:
type: array
items:
oneOf:
- $ref: "#/definitions/Parameter"
- $ref: "#/definitions/Reference"
switch:
- if:
required: [$ref]
then:
$ref: "#/definitions/Reference"
- then:
$ref: "#/definitions/Parameter"
# oneOf:
# - $ref: "#/definitions/Parameter"
# - $ref: "#/definitions/Reference"
uniqueItems: true
requestBody:
oneOf:
Expand Down Expand Up @@ -617,31 +624,31 @@ definitions:
SchemaXORContent:
description: Schema and content are mutually exclusive, at least one is required
not:
required:
- schema
- content
required:
- schema
- content
oneOf:
- required:
- schema
- required:
- content
description: Some properties are not allowed if content is present
allOf:
- not:
required:
- style
- not:
required:
- explode
- not:
required:
- allowReserved
- not:
required:
- example
- not:
required:
- examples
description: Some properties are not allowed if content is present
allOf:
- not:
required:
- style
- not:
required:
- explode
- not:
required:
- allowReserved
- not:
required:
- example
- not:
required:
- examples
Parameter:
type: object
properties:
Expand Down

0 comments on commit f1f7551

Please sign in to comment.