Summary
The user is asking for guidance on correctly implementing the oneOf keyword in a JSON schema.
Question
<@U04SE163WC8> how do I implement the oneOf in this part of my spec correctly?
"order": 3,
"description": "Determines which API endpoint to POST details.",
"title": "Endpoint",
"type": "object",
"display_type": "dropdown",
"oneOf": [
{
"title": "Customers",
"type": "object",
"display_type": "dropdown",
"properties": {
"BillAddr": {
"Line1": "123 Main Street",
"City": "Mountain View",
"Country": "USA",
"CountrySubDivisionCode": "CA",
"PostalCode": "94042"
},
"Notes": "Here are other details.",
"DisplayName": "King's Groceries45",
"PrimaryPhone": {
"FreeFormNumber": "<tel:(555)555-5555|(555) 555-5555>"
},
"PrimaryEmailAddr": {
"Address": "<mailto:jdrew@myemail.com|jdrew@myemail.com>"
}
}
},
{
"title": "Employees",
"type": "object",
"display_type": "dropdown",
"properties": {
"BillAddr": {
"Line1": "123 Main Street",
"City": "Mountain View",
"Country": "USA",
"CountrySubDivisionCode": "CA",
"PostalCode": "94042"
},
"Notes": "Here are other details.",
"DisplayName": "King's Groceries45",
"PrimaryPhone": {
"FreeFormNumber": "<tel:(555)555-5555|(555) 555-5555>"
},
"PrimaryEmailAddr": {
"Address": "<mailto:jdrew@myemail.com|jdrew@myemail.com>"
}
}
}
]
}```
<br>
---
This topic has been created from a Slack thread to give it more visibility.
It will be on Read-Only mode here. [Click here](https://airbytehq.slack.com/archives/C027KKE4BCZ/p1705417557291549) if you want to access the original thread.
[Join the conversation on Slack](https://slack.airbyte.com)
<sub>
["json-schema", "oneof", "implementation"]
</sub>