|
1 |
| -{% from "./type.html" import type %} {% from "./schema-item.html" import |
| 1 | +{% from "./extensions.html" import extension %} |
| 2 | + {% from "./type.html" import type %} {% from "./schema-item.html" import |
2 | 3 | schemaItem %} {% from "./description.html" import getDescription %} {% macro
|
3 | 4 | schemaProp(prop, propName, open=false, root=false, odd=false, specialName=false,
|
4 | 5 | required=false, altDescription=null, circularPropsParent) %}
|
|
156 | 157 | circularPropsParent | includes(pName) %} {% if isPropCircular === true %}
|
157 | 158 | {{ schemaItem(pName, odd) }} {% else %} {{ schemaProp(p, pName, odd=(not
|
158 | 159 | odd), required=(prop.required() | includes(pName)), circProps) }} {% endif
|
159 |
| - %} {% endfor %} {% endif %} {% set extensions = prop | nonParserExtensions |
160 |
| - %} {% if extensions.size > 0 %} |
161 |
| - <p class="pl-6 mb-2 mt-4 text-sm font-bold text-gray-700"> |
162 |
| - Specification Extensions: |
163 |
| - </p> |
164 |
| - {% for extensionName, extensionValue in extensions %} |
165 |
| - <div class="{% if odd %}bg-gray-100{% else %}bg-gray-200{% endif %} pl-6"> |
166 |
| - {% if extensionValue | isObject %} |
167 |
| - <div class="{% if open %}is-open{% endif %}"> |
168 |
| - <div class="js-prop cursor-pointer py-2 property"> |
169 |
| - <div class="pr-4" style="margin-top: -2px; min-width: 25%"> |
170 |
| - <span class="text-sm" style="word-break: break-word" |
171 |
| - >{{ extensionName }}</span |
172 |
| - > |
173 |
| - <svg |
174 |
| - class="expand inline align-baseline" |
175 |
| - version="1.1" |
176 |
| - viewBox="0 0 24 24" |
177 |
| - x="0" |
178 |
| - xmlns="http://www.w3.org/2000/svg" |
179 |
| - y="0" |
180 |
| - > |
181 |
| - <polygon |
182 |
| - points="17.3 8.3 12 13.6 6.7 8.3 5.3 9.7 12 16.4 18.7 9.7 " |
183 |
| - ></polygon> |
184 |
| - </svg> |
185 |
| - </div> |
186 |
| - </div> |
187 |
| - <div class="children"> |
188 |
| - <div |
189 |
| - class="{% if odd %}bg-gray-200{% else %}bg-gray-100{% endif %} {% if not root %}pl-8 pr-8{% endif %} rounded" |
190 |
| - > |
191 |
| - <pre class="text-sm">{{ extensionValue | dump(2) }}</pre> |
192 |
| - </div> |
193 |
| - </div> |
194 |
| - </div> |
195 |
| - {% else %} |
196 |
| - <div class="text-sm">{{ extensionName }}: {{ extensionValue }}</div> |
197 |
| - {% endif %} |
198 |
| - </div> |
199 |
| - {% endfor %} {% endif %} {% if prop.type() === 'array' %} {% set |
| 160 | + %} {% endfor %} {% endif %} {{ extension(prop, odd = true, indent = true) }} {% if prop.type() === 'array' %} {% set |
200 | 161 | arrayItemsProps = prop.items().properties() if prop.items() and not
|
201 | 162 | prop.items() | isArray else null %} {% if prop.items() and arrayItemsProps
|
202 | 163 | | isEmpty %}
|
|
0 commit comments