Skip to content

Commit

Permalink
docs(datasource/custom): document yaml format
Browse files Browse the repository at this point in the history
  • Loading branch information
nSimonFR committed Nov 10, 2023
1 parent 1441882 commit c774092
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions lib/modules/datasource/custom/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,39 @@ When Renovate receives this response with the `plain` format, it will convert it

After the conversion, any `jsonata` rules defined in the `transformTemplates` section will be applied as usual to further process the JSON data.

### Yaml

If `yaml` is used, response is processed by the `ts-yaml` library and then is converted into JSON.

Suppose the body of the HTTP response is as follows:

```yaml
releases:
- version: 1.0.0
- version: 2.0.0
- version: 3.0.0
```

When Renovate receives this response with the `yaml` format, it will convert it into the following:

```json
{
"releases": [
{
"version": "1.0.0"
},
{
"version": "2.0.0"
},
{
"version": "3.0.0"
}
]
}
```

After the conversion, any `jsonata` rules defined in the `transformTemplates` section will be applied as usual to further process the JSON data.

## Examples

### K3s
Expand Down

0 comments on commit c774092

Please sign in to comment.