Open ceejayoz opened 4 months ago
Scribe has a lot of functionality, so there's almost certainly a way to do what you want. 😅 most straightforward way I can think of right now is adding a custom strategy that runs after the validation rules strategies. They're meant for adding information, but nothing stops you from removing as well.
Alternative option would be to override the validation rules strategies with yours, but that might be trickier.
Scribe version
4.29.0
Your question
We have an API endpoint with a FormRequest that takes a filename as input.
In
prepareForValidation()
, we do$this->merge(['extension' => pathinfo($this->input('filename'), PATHINFO_EXTENSION)]);
to determine the file extension. We then validate the resultingextension
value in therules()
function.In the resulting documentation, the
extension
parameter shows up, which makes readers think it can/should be sent instead of being computed for validation purposes as it actually is. Is there a way to suppress this attribute from the resulting documentation?Docs