diff --git a/layouts/partials/openapi/render-object-table.html b/layouts/partials/openapi/render-object-table.html index 21a185e3..85597e14 100644 --- a/layouts/partials/openapi/render-object-table.html +++ b/layouts/partials/openapi/render-object-table.html @@ -107,26 +107,27 @@ {{ end }} - {{/* additionalProperties should either be an OpenAPI schema object, or a - boolean. If it's the former, look for a `description` and render it as a note. - If it's `true`, do nothing. If it's `false`, raise a build-time error: - "Everything is extensible in Matrix unless otherwise noted". */}} - {{ if (ne $additionalProperties nil )}} + {{/* If additionalProperties is true, do nothing. + If additionalProperties is nil, treat is as the default (true) and do nothing. + If additionalProperties is false, raise a build-time error: + "Everything is extensible in Matrix unless otherwise noted". + Otherwise, it should be an OpenAPI schema object. Include the description + of that schema object, if it exists. */}} + {{ if (and (ne $additionalProperties nil) (ne $additionalProperties true)) }} + {{ if (and (reflect.IsMap $additionalProperties)) -}} + {{ if (index $additionalProperties "description") -}}