From 6d1ea8aafe289b7a72c1dd65d6be43d15bda1725 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> Date: Thu, 17 Nov 2022 07:21:27 +0000 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> --- layouts/partials/json-schema/resolve-additional-types.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/layouts/partials/json-schema/resolve-additional-types.html b/layouts/partials/json-schema/resolve-additional-types.html index f4e840a5..a93dc0ac 100644 --- a/layouts/partials/json-schema/resolve-additional-types.html +++ b/layouts/partials/json-schema/resolve-additional-types.html @@ -3,7 +3,8 @@ Finds and returns all nested objects, given a dict containing: * `schema`: a JSON schema object * `anchor_base`: a prefix to add to the HTML anchors generated for each object. If nil, no anchors are generated. - * `name`: optionally, a name to use for this object in error/warning messages. + * `name`: optionally, a name to use for this object in error/warning messages. If left unset, + the object's `title` property is used (if present). This template finds all nested objects inside `schema`. @@ -91,7 +92,7 @@ "name" (printf "%s.items" $name) ) }} {{ else }} - {{ errorf "%s is defined as as an 'array' but lacks a valid 'items'" $name }} + {{ errorf "%s is defined as an 'array' but lacks a valid 'items'" $name }} {{ end }} {{ end }}