How to specify a property as null or a reference? discusses how to specify a property as null or a reference using jsonschema. I'm looking to do the same thing with swagger. To recap the answer to the above, with jsonschema, one could do this: { "definitions": { "Foo": { # some complex object } }, "type": "object", "properties": { "foo": { "oneOf": [ {"$ref": "#/definitions/Foo"}, {"type": "null"}