RonasIT / laravel-swagger

Laravel-Swagger is a fully automate tool which allows to generate and save swagger-based documentation after successful completing your application's feature tests.
https://ronasit.com
MIT License
143 stars 42 forks source link

Add support of array rules #15

Closed Asxer closed 2 years ago

Asxer commented 5 years ago

Currently, plugin support only one format of rules, like:

    'some_field' => 'first_rule|second_rule|some_other_rules'

Because we can easily parse it to description.

Laravel supports more complex formats(array of string rules and array of validators) and in this case, we will get an exception because we are trying to send it to implode. It is only one reason why we still use string-based validations in rules. We don't know how we can process such a situation correctly.

It is because I create this issue to discuss possible solutions.

gluck1986 commented 5 years ago

it is solved in https://github.com/RonasIT/laravel-swagger/pull/14

DenTray commented 2 years ago

Released since 1.6.1, but better to use 2.0.0-beta