-
-
Notifications
You must be signed in to change notification settings - Fork 874
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
[Hydra] add collection flag in documentation properties #1189
Conversation
e8bea53
to
f2fcd17
Compare
@dunglas, can you look quickly before I update the test suite ? |
|
||
$type = $propertyMetadata->getType(); | ||
|
||
if (null !== $type && !$type->isCollection() && (null !== $className = $type->getClassName()) && $this->resourceClassResolver->isResourceClass($className)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this part really necessary (null !== $className = $type->getClassName()) && $this->resourceClassResolver->isResourceClass($className)
?
Even if it is not a resource, the max cardinality is 1 if it's not a collection isn't it?
Looks good to me @fmata. Great job! |
@fmata do you think you can finish this one soon? I would like to include it in 2.1 beta 2 (it is important for our client-side tools). |
f2fcd17
to
f74b79d
Compare
@dunglas yep but I encounter some problem with the test suite on my setup, many errors or fails unrelated
...
I use phpunit in vendors or the bridge. Tests on Travis fail because order in array keys are not respected :/ Edit: strange, tests are green now but I changed nothing... |
@fmata try to run |
Thank you very much @fmata! |
…tion [Hydra] add collection flag in documentation properties
Today it's impossible to know if an Hydra property is a collection of * or not.
I implemented the solution provided on https://lists.w3.org/Archives/Public/public-hydra/2017Jun/0010.html.