Expect the value of a property to be an array with content of type string or an empty array

I would like to know how to structure the following response body into a jsonschema.

    {
    "iAmThePropOfAnObject":[]
}

{
    "iAmThePropOfAnObject":[
        "this would be string in some cases",
        "this would be another string in some cases"
    ]
}

So these are the two instances my property would have, one is a simple empty array as value to it, and the other one is an array containing a list of strings.

How can I tell my schema to look for one of those two?

This was my attempt

            "iAmThePropOfAnObject":{
            "oneOf":[
                "type":"array",
                "items":{
                    {"type":"string"}
                },
                {
                    {"type":"string"}
                }
            ]},

Hi @bezzea,

I would suggest looking at the Miscellaneous Examples page of the JSON Schema site - scroll to “Arrays of things” and look at how they are validating the fruits array.

Hopefully that helps! :pray: