scribe
scribe copied to clipboard
Strategy ResponseCalls running on all endpoints instead of only GET endpoints
Scribe version
4.35
PHP version
8.2.18
Framework
Laravel
Framework version
11.5.0
Scribe config
type => "external_laravel"
theme => "elements"
external.html_attributes.apiDescriptionUrl => "/docs.openapi"
external.html_attributes.basePath => "/docs"
external.html_attributes.layout => "responsive"
external.html_attributes.router => "hash"
external.html_attributes.tryItCredentialsPolicy => "same-origin"
auth.enabled => true
auth.default => true
auth.name => "Authorization"
examples.faker_seed => 666
What happened?
Hello,
Thanks for your awesome package, it's really useful !
I have the default strategies in my configuration for responses :
'strategies' => [
// ...
'responses' => [
Strategies\Responses\UseResponseAttributes::class,
Strategies\Responses\UseTransformerTags::class,
Strategies\Responses\UseApiResourceTags::class,
Strategies\Responses\UseResponseTag::class,
Strategies\Responses\UseResponseFileTag::class,
[
Strategies\Responses\ResponseCalls::class,
['only' => ['GET *']]
]
],
// ...
],
The ResponseCalls should called only on GET endpoints but it's not the case, it's called on all endpoints, including POST, PUT, DELETE, ...
It's really annoying when it's called on endpoints that can't be rollback (like send mail or something like that).
Thanks in advance, Best regards, Max
Docs
- [X] I've checked the docs, the troubleshooting guide, and existing issues, but I didn't find a solution