Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing quote and syntax highlight in README #938

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@ 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`

##### Adding custom tags

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",
Expand All @@ -70,7 +70,7 @@ The !Scalar-example would map to a scalar custom tag, the !Seq-example would map

We can then use the newly defined custom tags inside our YAML file:

```YAML
```yaml
some_key: !Scalar-example some_value
some_sequence: !Seq-example
- some_seq_key_1: some_seq_value_1
Expand All @@ -93,8 +93,8 @@ myProject

you can do

```
yaml.schemas: {
```json
"yaml.schemas": {
"https://json.schemastore.org/composer": "/myYamlFile.yaml"
}
```
Expand All @@ -110,7 +110,7 @@ and that will associate the composer schema with myYamlFile.yaml.
When associating a schema it should follow the format below

```json
yaml.schemas: {
"yaml.schemas": {
"url": "globPattern",
"Kubernetes": "globPattern"
}
Expand All @@ -119,23 +119,23 @@ yaml.schemas: {
e.g.

```json
yaml.schemas: {
"yaml.schemas": {
"https://json.schemastore.org/composer": "/*"
}
```

e.g.

```json
yaml.schemas: {
"yaml.schemas": {
"kubernetes": "/myYamlFile.yaml"
}
```

e.g.

```json
yaml.schemas: {
"yaml.schemas": {
"https://json.schemastore.org/composer": "/*",
"kubernetes": "/myYamlFile.yaml"
}
Expand All @@ -144,15 +144,15 @@ yaml.schemas: {
On Windows with full path:

```json
yaml.schemas: {
"yaml.schemas": {
"C:\\Users\\user\\Documents\\custom_schema.json": "someFilePattern.yaml",
}
```

On Mac/Linux with full path:

```json
yaml.schemas: {
"yaml.schemas": {
"/home/user/custom_schema.json": "someFilePattern.yaml",
}
```
Expand All @@ -166,7 +166,7 @@ Since `0.11.0` YAML Schemas can be used for validation:
A schema can be associated with multiple globs using a json array, e.g.

```json
yaml.schemas: {
"yaml.schemas": {
"kubernetes": ["filePattern1.yaml", "filePattern2.yaml"]
}
```
Expand Down Expand Up @@ -216,8 +216,8 @@ My_second_project:

You must then associate schemas relative to the root of the multi root workspace project.

```
yaml.schemas: {
```json
"yaml.schemas": {
"My_first_project/my_schema.json": "test.yaml",
"My_second_project/my_schema2.json": "test2.yaml"
}
Expand All @@ -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.schemas: {
```json
"yaml.schemas": {
"https://json.schemastore.org/circleciconfig#/definitions/jobs/additionalProperties": "/src/jobs/*.yaml",
}
```
Expand Down
Loading