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

Update Dedoc Verison and Spatie Query Builder Version. #2

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

udawadi007
Copy link

Fixed issues with sort-names.
Update dependency version.

@layerok
Copy link
Member

layerok commented Aug 15, 2024

Hi, thanks for contribution.
I noticed you did some changes that will break AllowedFilterModesExtension. I added tests that you can run to be sure that your changes didn't break anything.

…re going to exception handle with default value for user who are using Latest stable version of:

"dedoc/scramble": "^0.11.0",
"spatie/laravel-query-builder": "^6.0"

Update sorts extension with available sort parameter.
@@ -30,7 +30,7 @@ public function handle(Operation $operation, RouteInfo $routeInfo)

$values = $helper->inferValues($methodCall, $routeInfo);

$parameter = new Parameter(config(AllowedFilter::FilterModesQueryParamConfigKey), 'query');
$parameter = new Parameter(config(AllowedFilter::FilterModesQueryParamConfigKey)??"filter_mode", 'query');
Copy link
Member

@layerok layerok Aug 16, 2024

Choose a reason for hiding this comment

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

you can just exclude AllowedFilterModesExtension from scramble extensions (config/scramble.php).
That way you won't get any exceptions for reading non-existent config key. There is no need to add this change. Please, remove it

Copy link
Author

Choose a reason for hiding this comment

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

Yep. I was missing that. Will update on that. Thank you.

@layerok
Copy link
Member

layerok commented Aug 16, 2024

here is command to run tests

./vendor/bin/pest

udawadi007 and others added 5 commits August 28, 2024 11:31
Even though Test will be failed, as it does not match with existing expected value and structure. Also current sort doesn't show which key are available as sort option. So include those information on description, with-out affection other flows of sort. Also work well with Dedoc Scramble Documentation testing.

Revert back to original author for Allowed FilterModes Extension.
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