Skip to main content

oneOf with Nested oneOf

GET 

/oneof-nested

Schema:

type: object
properties:
oneOfProperty:
oneOf:
- type: object
properties:
nestedOneOfProp:
oneOf:
- type: string
- type: number
- type: boolean

Responses

Successful response

Schema
    oneOfProperty object
    oneOf
    nestedOneOfProp object
    oneOf
    string
import http.client

conn = http.client.HTTPSConnection("docusaurus-openapi.tryingpan.dev")
payload = ''
headers = {
'Accept': 'application/json'
}
conn.request("GET", "/oneof-nested", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))