{{/* Render a table listing the properties of an object, given: * `title`: optional caption for the table * `anchor`: optional HTML element id for the table * `properties`: optional dictionary of the properties to list, each given as: `property_name` : `property_data` * `additionalProperties`: a JSON Schema for additional properties on the object. * `patternProperties`: optional dictionary for properties with names adhering to a regex pattern. A map from regex pattern to JSON Schema. * `required`: optional array containing the names of required properties. In some cases (such as response body specifications) this isn't used, and instead properties have a `required` boolean attribute. We support this too. */}} {{ $title := .title }} {{ $properties := .properties}} {{ $required := .required}} {{ if $properties }}
Name | Type | Description |
---|---|---|
{{ $property_name }} |
{{ partial "partials/property-type" $property | safeHTML }} |
{{ partial "partials/property-description" (dict "property" $property "required" $required) }} |
<Other properties> | {{ partial "partials/property-type" .additionalProperties | safeHTML }} |
{{ partial "partials/property-description" (dict "property" .additionalProperties) }} |
Type | Description |
---|---|
{{ partial "partials/property-type" $property | safeHTML }} |
{{ partial "partials/property-description" (dict "property" $property) }} |
One of: [{{ delimit .property.enum ", " }}]
.