Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Config] Generate JSON schema for config#62125
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:7.4
Are you sure you want to change the base?
Conversation
| if ($_ENV['TEST_GENERATE_FIXTURES'] ?? false) { | ||
| file_put_contents(__DIR__ . '/../Fixtures/Configuration/ExampleConfiguration.schema.json', $jsonSchema); | ||
| $this->markTestIncomplete('TEST_GENERATE_FIXTURES is set'); | ||
| } |
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.
Same pattern proposed in#62121
if you expect such script to be a supported use case, the |
4239dc4 to93c3cbbCompare93c3cbb todacaef1Compare| if ($node->isDeprecated()) { | ||
| $schema['deprecated'] = true; | ||
| $schema['deprecationMessage'] = $node->getDeprecationMessage($node); |
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.
deprecationMessage is not a JSON Schema key. This info should move todescription.
Uh oh!
There was an error while loading.Please reload this page.
Supersede#59620, but generate nested objects instead of flatten definitions with hash as id. This is easier to read.
This PR only take care of the generating a JSON schema from a config node.
I also wrote this script that can be put in a composer plugin or a standalone script to generate a unique schema file for all the environments.