You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First off cheers to @yannick-softwerft for delivering the feature itself. I happen to need it myself, but I had troubles marking response fields as required on nested objects in OpenAPI specs.
I have an endpoint that provides list of entities, response looks like this:
I was able to generate OpenAPI specs with required response fields list, but only for the single data object in it. For array of objects I wasn't able to achieve expected results. I also tried various notations to define the fields (omitting data itself, trying to hint in index as data.*.name, etc.), but to no avail.
After some digging through the code base I was able to fix the issue and am happy to create PR for it, assuming that my approach in describing the API was correct and this is indeed a bug/missing piece.
Scribe version
4.38
PHP version
8.3
Framework
Laravel
Framework version
v11.27.2
Scribe config
What happened?
First off cheers to @yannick-softwerft for delivering the feature itself. I happen to need it myself, but I had troubles marking response fields as required on nested objects in OpenAPI specs.
I have an endpoint that provides list of entities, response looks like this:
Here's the endpoint signature and relevant part of docs:
Expected result should look like this:
I was able to generate OpenAPI specs with
required
response fields list, but only for the single data object in it. For array of objects I wasn't able to achieve expected results. I also tried various notations to define the fields (omittingdata
itself, trying to hint in index asdata.*.name
, etc.), but to no avail.After some digging through the code base I was able to fix the issue and am happy to create PR for it, assuming that my approach in describing the API was correct and this is indeed a bug/missing piece.
Docs
The text was updated successfully, but these errors were encountered: