Spaces:
Sleeping
Sleeping
Update app/templates/RESTlet.html.j2
Browse files- app/templates/RESTlet.html.j2 +19 -21
app/templates/RESTlet.html.j2
CHANGED
|
@@ -4,45 +4,43 @@
|
|
| 4 |
{% block content %}
|
| 5 |
|
| 6 |
{# =========================
|
| 7 |
-
VALIDACI脫N RA脥Z
|
| 8 |
========================= #}
|
| 9 |
-
{% if not (doc and doc is mapping
|
| 10 |
<div class="alert alert-error">
|
| 11 |
-
<strong>Error:</strong> El
|
| 12 |
</div>
|
| 13 |
{% else %}
|
| 14 |
|
| 15 |
-
{% set document = doc.doc %}
|
| 16 |
-
|
| 17 |
<header class="doc-header">
|
| 18 |
<h1>
|
| 19 |
RESTlet 路
|
| 20 |
-
{{
|
| 21 |
-
if
|
| 22 |
-
else
|
| 23 |
-
if
|
| 24 |
else "Documento sin metadata" }}
|
| 25 |
</h1>
|
| 26 |
<p class="doc-header-meta">
|
| 27 |
-
SuiteScript {{
|
| 28 |
</p>
|
| 29 |
<p class="muted">Documentaci贸n t茅cnica del servicio RESTlet.</p>
|
| 30 |
</header>
|
| 31 |
|
| 32 |
-
{% if
|
| 33 |
-
{{ ui.metadata_block(
|
| 34 |
{% else %}
|
| 35 |
<p class="muted">No se proporcion贸 metadata.</p>
|
| 36 |
{% endif %}
|
| 37 |
|
| 38 |
-
{% if
|
| 39 |
-
{{ ui.summary_block(
|
| 40 |
{% endif %}
|
| 41 |
|
| 42 |
{# ============================================================
|
| 43 |
ENDPOINTS
|
| 44 |
============================================================ #}
|
| 45 |
-
{% set endpoints =
|
| 46 |
|
| 47 |
<div class="section">
|
| 48 |
<h2>Endpoints</h2>
|
|
@@ -139,13 +137,13 @@
|
|
| 139 |
</div>
|
| 140 |
|
| 141 |
{# ================= VALIDACIONES GLOBALES ================= #}
|
| 142 |
-
{% if
|
| 143 |
-
{{ ui.list_block("Validaciones globales",
|
| 144 |
{% endif %}
|
| 145 |
|
| 146 |
{# ================= ERRORES ================= #}
|
| 147 |
-
{% if
|
| 148 |
-
{{ ui.table_block("Errores",
|
| 149 |
{"field": "location", "title": "Ubicaci贸n"},
|
| 150 |
{"field": "description", "title": "Descripci贸n"},
|
| 151 |
{"field": "throws", "title": "Excepci贸n"}
|
|
@@ -153,8 +151,8 @@
|
|
| 153 |
{% endif %}
|
| 154 |
|
| 155 |
{# ================= SIDE EFFECTS GLOBALES ================= #}
|
| 156 |
-
{% if
|
| 157 |
-
{{ ui.list_block("Side effects globales",
|
| 158 |
{% endif %}
|
| 159 |
|
| 160 |
{% endif %}
|
|
|
|
| 4 |
{% block content %}
|
| 5 |
|
| 6 |
{# =========================
|
| 7 |
+
VALIDACI脫N RA脥Z REAL
|
| 8 |
========================= #}
|
| 9 |
+
{% if not (doc and doc is mapping) %}
|
| 10 |
<div class="alert alert-error">
|
| 11 |
+
<strong>Error:</strong> El documento recibido no tiene una estructura v谩lida.
|
| 12 |
</div>
|
| 13 |
{% else %}
|
| 14 |
|
|
|
|
|
|
|
| 15 |
<header class="doc-header">
|
| 16 |
<h1>
|
| 17 |
RESTlet 路
|
| 18 |
+
{{ doc.metadata.description
|
| 19 |
+
if doc.metadata and doc.metadata.description
|
| 20 |
+
else doc.metadata.script_type
|
| 21 |
+
if doc.metadata
|
| 22 |
else "Documento sin metadata" }}
|
| 23 |
</h1>
|
| 24 |
<p class="doc-header-meta">
|
| 25 |
+
SuiteScript {{ doc.metadata.suitescript_version if doc.metadata else "N/D" }}
|
| 26 |
</p>
|
| 27 |
<p class="muted">Documentaci贸n t茅cnica del servicio RESTlet.</p>
|
| 28 |
</header>
|
| 29 |
|
| 30 |
+
{% if doc.metadata %}
|
| 31 |
+
{{ ui.metadata_block(doc.metadata) }}
|
| 32 |
{% else %}
|
| 33 |
<p class="muted">No se proporcion贸 metadata.</p>
|
| 34 |
{% endif %}
|
| 35 |
|
| 36 |
+
{% if doc.summary %}
|
| 37 |
+
{{ ui.summary_block(doc.summary) }}
|
| 38 |
{% endif %}
|
| 39 |
|
| 40 |
{# ============================================================
|
| 41 |
ENDPOINTS
|
| 42 |
============================================================ #}
|
| 43 |
+
{% set endpoints = doc.endpoints if doc.endpoints and doc.endpoints is mapping else {} %}
|
| 44 |
|
| 45 |
<div class="section">
|
| 46 |
<h2>Endpoints</h2>
|
|
|
|
| 137 |
</div>
|
| 138 |
|
| 139 |
{# ================= VALIDACIONES GLOBALES ================= #}
|
| 140 |
+
{% if doc.validations %}
|
| 141 |
+
{{ ui.list_block("Validaciones globales", doc.validations) }}
|
| 142 |
{% endif %}
|
| 143 |
|
| 144 |
{# ================= ERRORES ================= #}
|
| 145 |
+
{% if doc.errors %}
|
| 146 |
+
{{ ui.table_block("Errores", doc.errors, [
|
| 147 |
{"field": "location", "title": "Ubicaci贸n"},
|
| 148 |
{"field": "description", "title": "Descripci贸n"},
|
| 149 |
{"field": "throws", "title": "Excepci贸n"}
|
|
|
|
| 151 |
{% endif %}
|
| 152 |
|
| 153 |
{# ================= SIDE EFFECTS GLOBALES ================= #}
|
| 154 |
+
{% if doc.side_effects %}
|
| 155 |
+
{{ ui.list_block("Side effects globales", doc.side_effects) }}
|
| 156 |
{% endif %}
|
| 157 |
|
| 158 |
{% endif %}
|