Adds support to detect the oneOf property and replace the value with the first defined schema in the array. This prevents swagger from breaking as they don't support oneOf.
Will replace the node oneOf with the first defined schema, i.e. with { type: 'object', properties: { ... } }. This way Swagger continues to work showing the documentation for the first schema in the array.
Note: It does not support definitions. It'll only work for inline schemas as the example above.
Brief
Adds support to detect the
oneOf
property and replace the value with the first defined schema in the array. This prevents swagger from breaking as they don't supportoneOf
.E.g.:
Will replace the node
oneOf
with the first defined schema, i.e. with{ type: 'object', properties: { ... } }
. This way Swagger continues to work showing the documentation for the first schema in the array.Note: It does not support
definitions
. It'll only work for inline schemas as the example above.