-
-
Notifications
You must be signed in to change notification settings - Fork 844
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
Refactor XML loaders and various quality fixes #738
Conversation
I rewrote the XML Schema. The new format looks like: <?xml version="1.0" encoding="UTF-8" ?>
<resources>
<resource class="ApiPlatform\Core\Tests\Fixtures\TestBundle\Entity\Dummy"/>
<resource
class="ApiPlatform\Core\Tests\Fixtures\TestBundle\Entity\FileConfigDummy"
shortName="thedummyshortname"
description="Dummy resource"
iri="someirischema"
>
<itemOperation name="my_op_name">
<attribute name="method">GET</attribute>
</itemOperation>
<itemOperation name="my_other_op_name">
<attribute name="method">POST</attribute>
</itemOperation>
<collectionOperation name="my_collection_op">
<attribute name="method">POST</attribute>
<attribute name="path">the/collection/path</attribute>
</collectionOperation>
<attribute name="normalization_context">
<attribute name="groups">
<attribute>default</attribute>
</attribute>
</attribute>
<attribute name="denormalization_context">
<attribute name="groups">
<attribute>default</attribute>
</attribute>
</attribute>
<attribute name="hydra_context">
<attribute name="@type">hydra:Operation</attribute>
<attribute name="@hydra:title">File config Dummy</attribute>
</attribute>
</resource>
</resources> WDYT @soyuka? |
{ | ||
private function __construct() |
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.
Why are we adding empty contruct functions?
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 constructor is private. It's to block the possibility of initializing this class (it should only conain static methods).
@@ -20,8 +20,12 @@ | |||
* @author Teoh Han Hui <teohhanhui@gmail.com> | |||
* @author Vincent Chalamon <vincentchalamon@gmail.com> | |||
*/ | |||
abstract class QueryChecker | |||
final class QueryChecker |
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.
\o/
Great improvements!! 👍 |
👍 |
@@ -1,8 +1,8 @@ | |||
{ | |||
"name": "api-platform/core", | |||
"type": "library", | |||
"description": "JSON-LD / Hydra REST API for Symfony", | |||
"keywords": ["REST", "API", "JSON", "JSON-LD", "Hydra"], | |||
"description": "The ultimate solution to create web APIs.", |
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.
😉
Refactor XML loaders and various quality fixes
symfony/config
for XML parsing