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
- 200
Successful response
- application/json
- Schema
- Example (auto)
Schema
oneOfProperty object
{
"oneOfProperty": {
"nestedOneOfProp": "string"
}
}
- python
- curl
- csharp
- go
- nodejs
- ruby
- php
- java
- powershell
- dart
- javascript
- c
- objective-c
- ocaml
- r
- swift
- kotlin
- rust
- HTTP.CLIENT
- REQUESTS
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"))