Skip to content

Commit

Permalink
Fix links for versioned JSON schema files (#244)
Browse files Browse the repository at this point in the history
(Cherry picked from unfinished global jsonschema PR)
  • Loading branch information
jkellerer authored Aug 8, 2023
1 parent 2bf0d28 commit 6cbfdb3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions contrib/templates/config-reference.gomd
Original file line number Diff line number Diff line change
Expand Up @@ -361,9 +361,10 @@ JSON schema URLs for a specific *restic* version:
* `.../config-2-restic-{MAJOR}-{MINOR}.json`

Available URLs:
{{ range $v := .KnownResticVersions }}
* {{ $webBaseUrl }}/jsonschema/config-2-restic-{{ $v | replace "." "-" }}.json
* {{ $webBaseUrl }}/jsonschema/config-1-restic-{{ $v | replace "." "-" }}.json
{{ range $version := .KnownResticVersions }}
{{- $version = slice ($version | split ".") 0 2 | join "." }}
{{- "\n" }} * {{ $webBaseUrl }}/jsonschema/config-2-restic-{{ $version | replace "." "-" }}.json
{{- "\n" }} * {{ $webBaseUrl }}/jsonschema/config-1-restic-{{ $version | replace "." "-" }}.json
{{- end }}

{{ $layoutUpLink }}

0 comments on commit 6cbfdb3

Please sign in to comment.