Re: How to specify a property can be null or a reference

2017-06-23 Thread Ron Ratovsky
“null” is not a valid type in swagger, nor is “anyOf” or multi-types. From: 'Toe Dipper' via Swagger Reply-To: "swagger-swaggersocket@googlegroups.com" Date: Friday, 23 June 2017 at 11:54 To: Swagger

Re: How to specify a property can be null or a reference

2017-06-23 Thread 'Toe Dipper' via Swagger
I am also curious for support for "nullable" fields. Support for "oneOf" and "anyOf" is not quite the same thing. In JSON Schema, the "type" field can be an array, e.g. to indicate a nullable field: // In JSON Schema { "type": ["string", "null"] } // Or, using anyOf { "anyOf":[

Re: How to specify a property can be null or a reference

2016-12-02 Thread Daniel Popowich
tony tam writes: > I think you re describing that a value can be null or an object , forgetting > specification semantics. That would be done with the required flag unless I m > misunderstanding something thing. I'm talking about response objects, a returned object may be: {

Re: How to specify a property can be null or a reference

2016-12-02 Thread tony tam
I think you’re describing that a value can be “null” or an “object”, forgetting specification semantics. That would be done with the “required” flag unless I’m misunderstanding something thing. > On Dec 2, 2016, at 9:13 AM, Daniel Popowich wrote: > > > > On

Re: How to specify a property can be null or a reference

2016-12-02 Thread Daniel Popowich
On Friday, December 2, 2016 at 12:05:24 PM UTC-5, tony tam wrote: > > Hi, we are adding the oneOf and anyOf support in 3.0, and I believe the > “nullable” support is being added as well. > In other words, there's no way in 2.0 to specify a property of an object may be either NULL or a $ref?

Re: How to specify a property can be null or a reference

2016-12-02 Thread tony tam
Hi, we are adding the oneOf and anyOf support in 3.0, and I believe the “nullable” support is being added as well. > On Dec 1, 2016, at 2:38 PM, Daniel Popowich wrote: > > I've seen a lot of talk on github issues regarding swagger's lack of support > for oneOf and

How to specify a property can be null or a reference

2016-12-01 Thread Daniel Popowich
I've seen a lot of talk on github issues regarding swagger's lack of support for oneOf and anyOf. Setting aside the merits of the arguments over there, I'm looking for a practical solution to the problem of a response object (or any object, really) that has a property that can be EITHER