Comments (5)
Interesting, yeah it's a shame and I tried to move the getDescription
forward by documenting it in the last release.
property
is mainly used for https://www.hydra-cg.com/spec/latest/core/#templated-links and in the specification it is typed string
, and I recently added the php doc:
core/src/Metadata/FilterInterface.php
Line 56 in e867d07
In another change we now consider this as a string:
Actually your filter should return an array per property supported:
$description = ['type' => SearchFilterInterface::STRATEGY_PARTIAL,
'required' => false,
'schema' => ['type' => 'string']];
return ['firstName' => ['property' => 'firstName'] + $description, 'lastName' => ['property' => 'lastName'] + $description, 'middleName' => ['property' => 'middleName'] + $description];
Not sure it had any impact earlier on, let me know if this leads to issues elsewhere.
from core.
I think I cannot do this, because key should be name of the query parameter, which in my case is name
. When consumer does ?name=foo
, filter will do firstName LIKE '%foo%' OR lastName LIKE '%foo%' OR middleName LIKE '%foo%'
, hence I documented ['name' => ['property' => ['firstName', 'lastName', 'middleName']],
. If I split this to 3 filters with different key, this would indicate to consumer that they can do ?firstName=foo
, ?lastName=foo
, ?middleName=foo
instead of ?name=foo
, wouldn't it?
from core.
Yes indeed, I think I had a discussion with someone recently about this (probably at #5995 but can't find where). I think that what would be best would be to not set the property
in your case as it has an impact only on the documentation.
from core.
Ok then removing it is! Thanks for being reactive. I guess this is something we would have to address to folks making the standard itself?
from core.
You mean hydra? Yeah I'm on the mailing list but it's quite cold for now :/.
from core.
Related Issues (20)
- Filters incompatible with PHP 8.2.20 and 8.3.8 HOT 22
- Implement getType for ODM DoctrineExtractor HOT 1
- Mixing REST and GraphQL operation names HOT 3
- Access checks for a DTO created through a resolver should happen after it was created HOT 2
- Doctrine ODM Documents return inconsistent data for GET Collection and Item Operations in Symfony production environment HOT 1
- Calling GraphQL DeleteMutation ignores serialization groups and causes error HOT 2
- securityPostValidation argument on ApiResource and operations attributes is ignored when having use_symfony_listeners: true HOT 2
- Upgrade from 3.3.6 to 3.3.7 leads to 405 for OPTIONS request on / HOT 4
- Varnish invalidation on subresource HOT 1
- `DateFilter` does not work sometimes until the cache is cleared.
- JsonSchema validation fail for non-readable link with `assertMatchesResourceItemJsonSchema`
- v3.3.8: Embedded subresources no longer denormalizing HOT 19
- Error during PUT operation when using DTO and stateOptions HOT 1
- Metadata/ApiProperty.php default property has incorrect PHP annotation type HOT 1
- Invalid IRIs in output DTOs HOT 6
- 3.3.10 [BC break?]: Entities with embedded non-resource subentities fail schema checks after #6366 HOT 3
- 'uri_variables' missing from context during denormalization
- ElasticSearch ItemNormalizer has incorrect return type on normalize
- "Unable to generate IRI" error after upgrade to 3.3
- Regression in `jsonopenapi` serialization of references caused by #4019
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from core.