To accommodate documenting objects and arrays in responses we need ObjectValue and ArrayValue. This would solve situations where the default discovery method (everything as strings) throws exceptions, like in #3.
I could think of something like this:
new ObjectValue(
closure: fn () => $this->resource->amazingObject(),
structure: [
'someBoolean' => new BooleanValue(),
'title' => new StringValue(),
],
);
new ArrayValue(
closure: fn () => $this->resource->arrayItems(),
structure: [
new ObjectValue(structure: [
'value' => new StringValue(),
'nestedObject' => new ObjectValue(structure: ....),
]
],
)
Thoughts?
To accommodate documenting objects and arrays in responses we need
ObjectValueandArrayValue. This would solve situations where the default discovery method (everything as strings) throws exceptions, like in #3.I could think of something like this:
Thoughts?