Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix nested filters when generating examples for PHP, JS and Python #603

Merged
merged 2 commits into from
Jan 15, 2023

Conversation

AdamiecRadek
Copy link
Contributor

@AdamiecRadek AdamiecRadek commented Jan 13, 2023

This PR changes the way of generating examples for languages PHP, JS, and Python
Previously there was an issue when you had nested filters defined for your route like

[
  'data' => 'filled|array',
  'data.*' => 'required|array',
  'data.*.is_file' => 'required|boolean',
]

Possible connected issue: #308 and #455

Now Scribe will nicely generate examples for them.

use Knuckles\Scribe\Tests\BaseLaravelTest;
use Knuckles\Scribe\Tools\WritingUtils;

class WritingUtilsTest extends BaseLaravelTest
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No idea why I didn't have a test for this class already, so thanks for this. Now I need to add tests for the other things in that file.😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants