Active
Project:
Drupal core
Version:
main
Component:
extension system
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
11 Sep 2018 at 13:45 UTC
Updated:
22 Aug 2026 at 01:08 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
el7cosmosComment #10
dave reidHow can other contributed modules add to this schema?
Comment #12
chi commentedI think most of Drupal core yaml files have appropriate schemas. See #3061454: Add JSON schema for Drupal core yaml files for details.
Comment #14
chi commentedI think it was a mistake to add JSON schemas to schemastore this way. It's hard to maintain the schemas if you don't have access to them. We should have added just references to the repository with the schemas. Preferably, it should be Drupal core repository.
I propose the following changes.
1. Copy JSON schemas from https://github.com/5n00p4eg/Drupal-json-schemas to Drupal core.
2. Create a pull request for schemastore to replace the schemas.
Comment #15
chi commentedSince next PhpStorm release it should be possible to reference schemas in the Yaml files.
https://youtrack.jetbrains.com/issue/IDEA-271611
Comment #16
chi commentedRe #14
Since Drupal added support for service aliases the current JSON schema is no longer valid. Someone has to fix it and make a PR to schema store.
Comment #18
lostcarpark commentedI have created a PR in SchemaStore to add shorthand aliases.
https://github.com/SchemaStore/schemastore/pull/6229
Comment #19
lostcarpark commentedMoving the schemas back into a Drupal repo would seem to make sense, but for the short term I just thought we should get a small change in to stop IDEs getting upset about service.yml files.
Comment #20
nicxvan commentedThe link in the issue summary is 404, can someone find the right link?
Comment #21
lostcarpark commentedSchemaStore PR has been merged, and I can see it on the schemastore.org site. I'm not sure how long it takes to propagate through to my IDE, but hopefully service aliases will stop being flagged as errors soon.
@nicxvan I think the link should be https://www.schemastore.org/ - I'll update now.
Comment #22
lostcarpark commentedComment #23
lostcarpark commentedWell the aliases are fixed, but because of all the red underlines, I hadn't noticed
autowireandautoconfigurewere also missing from the schema.I've now opened another SchemaStore PR to fix it.
Comment #24
longwaveMaybe we should maintain a copy of the schemas in core, where we can use a test to ensure they are valid; we would still need a manual process to push them upstream after that unless SchemaStore can sync from us somehow.
Comment #25
nicxvan commentedI checked the issue queue and didn't see a way to manage the schema externally.
We could create an issue to discuss there.