Skip to content

fix(elasticsearch): add is_collection to documentation #5497

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

Merged
merged 1 commit into from
Apr 4, 2023

Conversation

dannyvw
Copy link
Contributor

@dannyvw dannyvw commented Mar 24, 2023

Q A
Branch? 3.0
Tickets #...
License MIT
Doc PR api-platform/docs#...

@@ -96,6 +96,7 @@ public function getDescription(string $resourceClass): array
'property' => $property,
'type' => $hasAssociation ? 'string' : $this->getPhpType($type),
'required' => false,
'is_collection' => str_ends_with((string) $filterParameterName, '[]'),
Copy link
Member

Choose a reason for hiding this comment

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

could we check the $type (or even $types) instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This should only be applied for "{$property}[]" and the $type property does not have this information. I use the same implementation as is done for doctrine https://github.com/api-platform/core/blob/main/src/Doctrine/Common/Filter/SearchFilterTrait.php#L79

@soyuka
Copy link
Member

soyuka commented Mar 31, 2023

i need more time to investigate that, could you target 3.1 anyways?

@dannyvw dannyvw force-pushed the es-filter-description branch from 7e89129 to 7a04c5d Compare March 31, 2023 17:35
@dannyvw dannyvw changed the base branch from 3.0 to 3.1 March 31, 2023 17:35
@soyuka soyuka merged commit 2586134 into api-platform:3.1 Apr 4, 2023
@soyuka
Copy link
Member

soyuka commented Apr 4, 2023

let's take this for now each time somethings has to do with filters I just want to improve them alltogether... Thanks!

@dannyvw dannyvw deleted the es-filter-description branch April 5, 2023 07:41
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