I am attempting to create a model in Stoplight Studio representing a schema with two and/or properties. For example, valid objects would be
{ "p1": 1, "p2": 2, "option1": 3 }
or
{ "p1": 1, "p2": 2, "option2": 4 }
or
{ "p1": 1, "p2": 2, "option1": 3, "option2": 4 }
When I attempt to model this in Stoplight Studio, it inserts invalid properties. The following is the YAML:
example_model:
title: Example
description: Example
allOf:
- type: object
properties:
p1:
type: number
p2:
type: number
- properties: {}
anyOf:
- children:
- type: number
name: option1
type: object
- type: object
properties: {}
children:
- type: number
name: option2
I am not familiar with the children
syntax, and Stoplight Studio reports an oas3-schema
error concerning this property.
That Stoplight Studio is inserting invalid properties seems like a bug, but it also raises the question, how should the above situation be modeled?