“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
Subject: Re: How to specify a property can be null or a ref
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":[
{"t
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:
{
"
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 Friday, December 2, 2016 at 12:05
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?
s over there:
>
> http://stackoverflow.com/questions/40920441/how-to-specify-a-property-can-be-null-or-a-reference-with-swagger
>
> --
> You received this message because you are subscribed to the Google Groups
> "Swagger" group.
> To unsubscribe from this g
, maybe someone here
can earn some points over there:
http://stackoverflow.com/questions/40920441/how-to-specify-a-property-can-be-null-or-a-reference-with-swagger
--
You received this message because you are subscribed to the Google Groups
"Swagger" group.
To unsubscribe from this grou