Skip to content

Commit

Permalink
nullable on the top-level element doesn't work well with anyOf/allOf/…
Browse files Browse the repository at this point in the history
…oneOf, therefore allow null as part of the other sub-schemas. See OAI/OpenAPI-Specification#1368 and related issues.
  • Loading branch information
m-mohr committed Jul 3, 2019
1 parent 577fdf5 commit bbfd1b2
Showing 1 changed file with 24 additions and 17 deletions.
41 changes: 24 additions & 17 deletions openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -823,14 +823,15 @@
"items": {
"anyOf": [
{
"type": "number"
"type": "number",
"nullable": true
},
{
"type": "string",
"format": "date-time"
"format": "date-time",
"nullable": true
}
],
"nullable": true
]
}
},
"values": {
Expand All @@ -840,20 +841,23 @@
"items": {
"anyOf": [
{
"type": "number"
"type": "number",
"nullable": true
},
{
"type": "string"
"type": "string",
"nullable": true
},
{
"type": "string",
"format": "date-time"
"format": "date-time",
"nullable": true
},
{
"type": "boolean"
"type": "boolean",
"nullable": true
}
],
"nullable": true
]
}
}
}
Expand Down Expand Up @@ -4111,7 +4115,6 @@
},
"default": {
"description": "Whenever no value for the variable is defined, the default value is used.",
"nullable": true,
"anyOf": [
{
"type": "string"
Expand All @@ -4127,7 +4130,8 @@
"type": "boolean"
},
{
"type": "object"
"type": "object",
"nullable": true
},
{
"$ref": "#/components/schemas/process_graph"
Expand Down Expand Up @@ -4170,7 +4174,6 @@
"process_argument_value": {
"title": "Process Argument Value",
"description": "Arguments for a process. See the API documentation for more information.",
"nullable": true,
"anyOf": [
{
"type": "string",
Expand All @@ -4186,7 +4189,8 @@
},
{
"type": "object",
"title": "Object"
"nullable": true,
"title": "Object (or null)"
},
{
"type": "array",
Expand All @@ -4210,7 +4214,8 @@
"description": "The ID of the node that data is expected to come from.",
"type": "string"
}
}
},
"additionalProperties": false
},
{
"type": "object",
Expand All @@ -4224,7 +4229,8 @@
"description": "The name of the parameter that is made available to a callback by a calling process.",
"type": "string"
}
}
},
"additionalProperties": false
},
{
"type": "object",
Expand All @@ -4237,7 +4243,8 @@
"callback": {
"$ref": "#/components/schemas/process_graph"
}
}
},
"additionalProperties": false
}
]
},
Expand Down

0 comments on commit bbfd1b2

Please sign in to comment.