-
-
Notifications
You must be signed in to change notification settings - Fork 922
Add attributes to metadata XSD file #1080
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
I did not commit updated fixtures as the XSD is not yet available from a public URL, I'll update the PR when the final location will be chosen (or is this not required ? I tried locally by defining a valid internal URL for the xsd file). |
Great. But as with Symfony, it should not rely on nor request an external server in production. So you can add fixtures without the file being publicly available, it will be a good test that it works. |
Added attributes allow to validate resources.xml files as developers can do with other Symfony config files (ex: routing, services, ...) Expected messages have been updated to match new syntax with XML namespace.
@dunglas Updated fixtures & exception message regexp in tests to include proposed namespace (after messing up with my git remotes while updating 😕 ). |
Thank you @scollado |
This PR breaks tests: https://travis-ci.org/api-platform/core/jobs/226752482 Do you have an idea of the problem @scollado? |
ping @scollado would you be able to patch the documentation about XML declarations there? |
@dunglas fixed, it was only an issue on master where we had more tests on XML than on 2.0. |
As per #1229, does this need to be done to the |
Nevermind. #1229 is fixed. |
Add attributes to metadata XSD file
Not a critical thing, but as I tend to prefer XML for configuration files I'm sure other will enjoy the change :
Added attributes allow to validate resources.xml files as developers can do with other Symfony config files (ex: routing, services, ...)
This would ease auto-completion by editors supporting XML structure hints from the XSD (like PHPStorm) by defining the namespace in the XML header, as other XML config files do in Symfony :
The proposed URI for the schema (
https://api-platform.com/schema/metadata/metadata-2.0.xsd
) is subject of discussion as it implies that the last stable version of the XSD file for the choosen branch is publicly available.I'll make the PR to the Getting-Started page of the documentation once those details will be sorted out.
WHat do you think about this ?