-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Include information on how to show names instead of IRIs for entities #785
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
Conversation
@alanpoulain I've done a bit of work with help from Gregoire if you want to check it out again! |
Nice work! |
Co-Authored-By: Cydonia7 <Cydonia7@users.noreply.github.com>
Co-Authored-By: Cydonia7 <Cydonia7@users.noreply.github.com>
Co-Authored-By: Cydonia7 <Cydonia7@users.noreply.github.com>
|
||
## Open Vocabulary Generated from Validation Metadata | ||
|
||
API Platform automatically detects Symfony's built-in validators and generates schema.org IRI metadata accordingly. This allows for rich clients such as the Admin component to infer the field types for most basic use cases. |
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.
I didn't know API Platform does this. It's bad as it's anybody's guess whether it's correct or not. 😞
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.
it's just basic type coverage, it does not prevent you to set your own types.
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.
The problem is that it might set the wrong type, when in fact, it's perfectly fine without. It's a bad kind of magic.
Thank you @Cydonia7! |
* Added yaml config to security page as indicated in api-platform#785. * Corrected method and admin message for collection post example.
By default, without more information, the admin shows IRIs for entities.
This makes it really hard for actual users to parse the information, especially when seeing relations this way. This is an attempt to document how to solve the problem marking the property with Schema.org (thanks @GregoireHebert for the tip in the first place)