Published public schema for craft-cloud.yaml #100
jamesmacwhite
started this conversation in
Feature Requests & Enhancements
Replies: 1 comment
-
|
I have this version of a https://gist.github.com/jamesmacwhite/7aeb1da95bb352e0f60fda71499aeb85 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The
craft-cloud.yamlfile is quite important for any Craft Cloud project, as it instructs the deployment process on how to build your Craft project to be deployed as a container image to the serverless infrastructure. All Craft Cloud projects must have a YAML file.Because of this importance I think it would be great if there were a public schema available which can be published to the SchemaStore project, which means it can be used by IDEs such as PHPStorm to have direct validation and descriptions of the
craft-cloud.yamlfile direct in the code editor.This idea was considered based on #98. YAML indents are notoriously easy to miss or mess up and having a schema to validate against would help. In addition, it could help prevent syntax errors or bad values which would lead to the deployment process erroring out. At the moment you'd have to check if the deployment errors out due to issues with this file.
As the functionality of Craft Cloud expands this YAML file may also add additional keys or functionality, so such as schema may need to be periodically updated. The best approach is likely the schema file living in the current Yii module or on a separate schema specific repository to be used as a consistent location/endpoint.
The documentation here is great already: https://craftcms.com/knowledge-base/cloud-config, being able to reference the public schema and even configure IDEs to autoselect it if published to a central SchemaStore would be even better I think!
Beta Was this translation helpful? Give feedback.
All reactions