knuckleswtf / knuckleswtf/scribe
Issue Documenting Array of objects
- Dominant language
- PHP
- Stars
- 2.3k
- Forks
- 357
- PR merge metrics
- No merged PRs in 30d
Description
### Scribe version
4.37
### PHP version
8.1
### Framework
Laravel
### Framework version
9.19
### Scribe config
```ruby
title => "SCRIBE"
type => "laravel"
laravel.add_routes => false
auth.enabled => true
auth.placeholder => "token"
strategies.responses => added [
'Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls',
[
'only' => [
'GET *',
],
],
]: removed [
'Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls',
[
'only' => [
'GET *',
],
'config' => [
'app.debug' => false,
],
],
]
```
### What happened?
I have used the following code comments
/**
* @bodyParam user object required The user details
* @bodyParam user.name string required The user's name
* @bodyParam user.age string required The user's age
* @bodyParam friend_ids int[] List of the user's friends.
* @bodyParam cars object[] List of cars
* @bodyParam cars[].year string The year the car was made. Example: 1997
* @bodyParam cars[].make string The make of the car. Example: Toyota
*/
But it is not generating docs as per given output in docs
Given Output

Actual Output

### Docs
- [X] I've checked [the docs](https://scribe.knuckles.wtf/laravel), the [troubleshooting guide](https://scribe.knuckles.wtf/laravel/troubleshooting), and [existing issues](https://github.com/knuckleswtf/scribe/issues?q=is%3Aissue+), but I didn't find a solution
Contributor guide
Research direction
Start by reproducing the generated documentation in Laravel 9.19 with the supplied @bodyParam annotations, especially the cars object[] fields. Compare the result with the linked expected and actual screenshots; done when arrays of objects and their year and make fields render as intended.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- laravel, php
- Domain
- api, documentation
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100