diff --git a/README.md b/README.md index 6d6c052a..95169c41 100755 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ The following settings are supported: - `[yaml].editor.formatOnType`: Enable/disable on type indent and auto formatting array - `yaml.disableDefaultProperties`: Disable adding not required properties with default values into completion text - `yaml.suggest.parentSkeletonSelectedFirst`: If true, the user must select some parent skeleton first before autocompletion starts to suggest the rest of the properties.\nWhen yaml object is not empty, autocompletion ignores this setting and returns all properties and skeletons. -- `yaml.style.flowMapping` : Forbids flow style mappings if set to `forbid` +- `yaml.style.flowMapping` : Forbids flow style mappings if set to `forbid` - `yaml.style.flowSequence` : Forbids flow style sequences if set to `forbid` - `yaml.keyOrdering` : Enforces alphabetical ordering of keys in mappings when set to `true`. Default is `false` @@ -58,7 +58,7 @@ The following settings are supported: In order to use the custom tags in your YAML file you need to first specify the custom tags in the setting of your code editor. For example, we can have the following custom tags: -```yaml +```json "yaml.customTags": [ "!Scalar-example scalar", "!Seq-example sequence", @@ -93,8 +93,8 @@ myProject you can do -```yaml -yaml.schemas: { +```json +"yaml.schemas": { "https://json.schemastore.org/composer": "/myYamlFile.yaml" } ``` @@ -109,8 +109,8 @@ and that will associate the composer schema with myYamlFile.yaml. When associating a schema it should follow the format below -```yaml -yaml.schemas: { +```json +"yaml.schemas": { "url": "globPattern", "Kubernetes": "globPattern" } @@ -118,24 +118,24 @@ yaml.schemas: { e.g. -```yaml -yaml.schemas: { +```json +"yaml.schemas": { "https://json.schemastore.org/composer": "/*" } ``` e.g. -```yaml -yaml.schemas: { +```json +"yaml.schemas": { "kubernetes": "/myYamlFile.yaml" } ``` e.g. -```yaml -yaml.schemas: { +```json +"yaml.schemas": { "https://json.schemastore.org/composer": "/*", "kubernetes": "/myYamlFile.yaml" } @@ -143,16 +143,16 @@ yaml.schemas: { On Windows with full path: -```yaml -yaml.schemas: { +```json +"yaml.schemas": { "C:\\Users\\user\\Documents\\custom_schema.json": "someFilePattern.yaml", } ``` On Mac/Linux with full path: -```yaml -yaml.schemas: { +```json +"yaml.schemas": { "/home/user/custom_schema.json": "someFilePattern.yaml", } ``` @@ -160,20 +160,20 @@ yaml.schemas: { Since `0.11.0` YAML Schemas can be used for validation: ```yaml - "/home/user/custom_schema.yaml": "someFilePattern.yaml" +"/home/user/custom_schema.yaml": "someFilePattern.yaml" ``` A schema can be associated with multiple globs using a json array, e.g. -```yaml -yaml.schemas: { +```json +"yaml.schemas": { "kubernetes": ["filePattern1.yaml", "filePattern2.yaml"] } ``` e.g. -```yaml +```json "yaml.schemas": { "http://json.schemastore.org/composer": ["/*"], "file:///home/johnd/some-schema.json": ["some.yaml"], @@ -184,7 +184,7 @@ e.g. e.g. -```yaml +```json "yaml.schemas": { "kubernetes": ["/myYamlFile.yaml"] } @@ -192,7 +192,7 @@ e.g. e.g. -```yaml +```json "yaml.schemas": { "http://json.schemastore.org/composer": ["/*"], "kubernetes": ["/myYamlFile.yaml"] @@ -216,8 +216,8 @@ My_second_project: You must then associate schemas relative to the root of the multi root workspace project. -```yaml -yaml.schemas: { +```json +"yaml.schemas": { "My_first_project/my_schema.json": "test.yaml", "My_second_project/my_schema2.json": "test2.yaml" } @@ -229,8 +229,8 @@ yaml.schemas: { Suppose a file is meant to be a component of an existing schema (like a `job.yaml` file in a circleci orb), but there isn't a standalone schema that you can reference. If there is a nested schema definition for this subcomponent, you can reference it using a url fragment, e.g.: -```yaml -yaml.schemas: { +```json +"yaml.schemas": { "https://json.schemastore.org/circleciconfig#/definitions/jobs/additionalProperties": "/src/jobs/*.yaml", } ```