From dcbf2967fd88613a5ce26d3c239344ce3edbd0bc Mon Sep 17 00:00:00 2001 From: Stephen J Day Date: Fri, 24 Jul 2015 19:00:25 -0700 Subject: [PATCH] Correctly generate URL examples specifications Signed-off-by: Stephen J Day --- docs/spec/api.md | 4 ++-- docs/spec/api.md.tmpl | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/spec/api.md b/docs/spec/api.md index ac2798d5..f7db730a 100644 --- a/docs/spec/api.md +++ b/docs/spec/api.md @@ -1241,7 +1241,7 @@ The error codes that may be included in the response body are enumerated below: ##### Tags Paginated ``` -GET /v2//tags/list?n=last= +GET /v2//tags/list?n=&last= ``` Return a portion of the tags for the specified repository. @@ -3249,7 +3249,7 @@ The following headers will be returned with the response: ##### Catalog Fetch Paginated ``` -GET /v2/_catalog?n=last= +GET /v2/_catalog?n=&last= ``` Return the specified portion of repositories. diff --git a/docs/spec/api.md.tmpl b/docs/spec/api.md.tmpl index d4f1c825..ec4e0200 100644 --- a/docs/spec/api.md.tmpl +++ b/docs/spec/api.md.tmpl @@ -1017,7 +1017,7 @@ The error codes encountered via the API are enumerated in the following table: ##### {{.Name}}{{end}} ``` -{{$method.Method}} {{$route.Path|prettygorilla}}{{if .QueryParameters}}?{{range .QueryParameters}}{{.Name}}={{.Format}}{{end}}{{end}}{{range .Headers}} +{{$method.Method}} {{$route.Path|prettygorilla}}{{range $i, $param := .QueryParameters}}{{if eq $i 0}}?{{else}}&{{end}}{{$param.Name}}={{$param.Format}}{{end}}{{range .Headers}} {{.Name}}: {{.Format}}{{end}}{{if .Body.ContentType}} Content-Type: {{.Body.ContentType}}{{end}}{{if .Body.Format}}