knuckleswtf / knuckleswtf/scribe
Demo site examples and collection schemas are broken
- Dominant language
- PHP
- Stars
- 2.3k
- Forks
- 357
- PR merge metrics
- No merged PRs in 30d
Description
### Scribe version
5.1.0
### PHP version
8.4.5
### Laravel version
12.3.0
### Scribe config
```ruby
type => "external_laravel"
theme => "scalar"
try_it_out.use_csrf => true
auth.in => "header"
auth.name => "Cookie"
```
### What happened?
> [!IMPORTANT]
> This issue stems from an underlying issue in `scribe` which can also be experienced in local development environments
In some instances of the examples on the `The SideProject API` demo page a few issues can be notably seen:
[Failed responses](https://demo.scribe.knuckles.wtf/#tag/dummy-endpoints/POST/api/file-input)

[Incorrect schema generation for collections](https://demo.scribe.knuckles.wtf/#tag/dummy-endpoints/POST/api/array-body)


### Personal Example:
```php
...
#[ResponseFromApiResource(ResourceCollection::class, User::class, collection: true, withCount: ['roles', 'permissions', 'teams'])]
public function index()
{
return User::withCount(['roles', 'permissions', 'teams'])->get()->all();
}
...
```


### 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 failed file-input example and incorrect collection schema on the linked demo pages using the reported Scribe, PHP, and Laravel versions. Trace the relevant Scribe handling for those examples; done means the demo responses succeed and collection schemas are generated correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- laravel, php
- Domain
- api, documentation
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100