On Saturday, May 12, 2018 at 6:35:18 AM UTC+5:30, Ron wrote:
>
> Widget?
>
>
>
>
>
>
>
> *From: *<[email protected] <javascript:>> on behalf of "
> [email protected] <javascript:>" <[email protected]
> <javascript:>>
> *Reply-To: *"[email protected] <javascript:>" <
> [email protected] <javascript:>>
> *Date: *Friday, May 11, 2018 at 00:43
> *To: *Swagger <[email protected] <javascript:>>
> *Subject: *Re: How to Use oneOf tag
>
>
>
> Hi All,
>
>
>
> I manage to get oneOf tag sorted by upgrading to swagger version 3.0.0.
> But still i have issue in *widget: "radio". *can any one help me on this.
>
>
>
>
>
> OneOf Tag Reference :
> https://github.com/OAI/OpenAPI-Specification/issues/333
>
>
>
> Thank you in advance.
>
>
>
>
>
>
> Hi Ron,
>
Yes we need to add a custom tag to that, For ease of the UI team to
identify its should be a radio button or toggle. Is this possible.
Regards,
>
> On Friday, May 11, 2018 at 9:34:30 AM UTC+5:30, [email protected]
> wrote:
>
> Hi All,
>
>
>
> I need to create add a property with oneOf tag. We are planing to use this
> for Radio button selection. I tried using oneOf tag but i get an error
> saying should NOT have additional properties assitionalProperty: oneOf.
>
>
>
> Output should be as bellow,
>
>
>
> *pet: { description: "Pet", type: "string", widget: "radio", oneOf: [ {
> enum: ["dog"], description: "Dog" }, { enum: ["cat"], description: "Cat" },*
>
> *{ enum: ["both"], description: "Both" }, ], default:"dog" }*
>
>
>
> I tried writing as bellow, (i get Errors in widget and onrOf tag)
>
>
>
> properties:
> pet:
> description: Pet
> type: object
> default: dog
> widget: raido
> oneOf:
> - $ref: '#/definitions/dog'
> - $ref: '#/definitions/cat'
>
>
>
> Two Definitions as bellow
>
> dog:
> type: object
> properties:
> id_type:
> type: string
> enum: [dog]
> description: "DOG"
>
> cat:
> type: object
> properties:
> id_type:
> type: string
> enum: [cat]
> description: "CAT"
>
>
>
>
>
> i would appriciate if some one can help me to sort this, Thank you.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Swagger" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected] <javascript:>.
> For more options, visit https://groups.google.com/d/optout.
>
>
--
You received this message because you are subscribed to the Google Groups
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.