Auto-Completion Feature for Application Configuration YAML File
ActiveMatrix Service Grid - Container Edition ships JSON schema which gives you the auto-completion feature when editing the application configuration YAML file in an editor. This schema is generated according to the YAML structure that is required to create the image. For the current release, this feature does not do schema validation to display errors in YAML file, but for ADD or UPDATE operation it displays required parameter error for an entity.
When editing the application configuration YAML file, you can get suggestions of the remaining parameters of an entity. You can add or update the required entity with auto-completion. For more information about the application configuration YAML file, see Understanding Application Configuration YAML File.
Using the JSON Schema in Visual Studio Code Editor
Currently, JSON schema supports the Visual Studio Code editor only. The JSON Schema .zip file is provided in the folder amsgce-runtime-<version>/jsonschema/JsonSchema.zip.
Procedure
- Extract
JsonSchema.zipto your local machine. Note the absolute path toamxce_schema.json. - Install the YAML plugin in Visual Studio Code. Restart Visual Studio Code.
- In Visual Studio Code, navigate to File > Preferences > Settings. Search
yamlin the search bar. Click the Edit in setting.json link. -
Add the following mapping in the
settings.json. Location must be the absolute path to the schema file on your system. Replace the<location>with the path that you noted in Step 2, which is the absolute path toamxce_schema.jsonfile.Add below mapping in settings.json { "yaml.schemas": { "<location>/amxce_schema.json": ["/*.config.yaml"], } }If you are using Microsoft Windows Operating System, add slash'/' before absolute path. For example:
/C:/schema/amxce_schema.json - Save
settings.jsonand restart Visual Studio Code.
When you create a new .config.yaml file and press CTRL + Space, Visual Studio Code displays the suggestions based on the schema amxce_schema.json and parameters specific to the application DAA.