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].
For more options, visit https://groups.google.com/d/optout.

Reply via email to