1 | <% for(var i in resources){ %> |
---|
2 | <h3><%=(resources[i].rest)%></h3> |
---|
3 | <div id="sub_<%=resources[i].id%>"> |
---|
4 | |
---|
5 | <% for( var j= 0; j < resources[i].method.length; j++ ){ %> |
---|
6 | <!-- Form de envio --> |
---|
7 | <h3><%=resources[i].method[j]%></h3> |
---|
8 | <div> |
---|
9 | <h4><%=resources[i].description%></h4> |
---|
10 | |
---|
11 | <% if( typeof(resources[i].params) == "object" ){ %> |
---|
12 | |
---|
13 | <table class="parameters"> |
---|
14 | <thead> |
---|
15 | <tr> |
---|
16 | <th>Parâmetro</th> |
---|
17 | <th>Valor</th> |
---|
18 | <th>Tipo</th> |
---|
19 | <th style="text-align: center;">Obrigatório</th> |
---|
20 | <th>Descrição</th> |
---|
21 | </tr> |
---|
22 | </thead> |
---|
23 | <tbody> |
---|
24 | <% for( var l in resources[i].params ){ %> |
---|
25 | <tr> |
---|
26 | <td><%=l%></td> |
---|
27 | <td> |
---|
28 | <input type="<%=resources[i].params[l][0]%>" <%=resources[i].params[l][1]%> value="<%=resources[i].params[l][4]%>" id="<%=resources[i].id%>_<%=l%>"> |
---|
29 | </td> |
---|
30 | <td><%=resources[i].params[l][2]%></td> |
---|
31 | <% if(resources[i].params[l][3] == true) { %> |
---|
32 | <td align="center"><font style="font-weight:bold;color:red">X</font></td> |
---|
33 | <% } else { %> |
---|
34 | <td align="center"> </td> |
---|
35 | <% } %> |
---|
36 | <td><%=resources[i].params[l][5]%></td> |
---|
37 | </tr> |
---|
38 | <% } %> |
---|
39 | </tbody> |
---|
40 | </table> |
---|
41 | <% } else { %> |
---|
42 | |
---|
43 | <div style="margin-bottom:10px;"> |
---|
44 | <span>Este método não necessita de parâmetros adicionais</span> |
---|
45 | </div> |
---|
46 | |
---|
47 | <% } %> |
---|
48 | |
---|
49 | <button onclick="<%=resources[i].click%>">Testar</button> |
---|
50 | |
---|
51 | <!-- Parametros Enviados --> |
---|
52 | <div id="param_<%=resources[i].id%>" style="display:none; margin-top:10px;"> |
---|
53 | <h3>Parâmetros enviados</h3> |
---|
54 | <div> |
---|
55 | Parametros enviados |
---|
56 | </div> |
---|
57 | </div> |
---|
58 | |
---|
59 | <!-- Resposta de Erro --> |
---|
60 | <div id="error_<%=resources[i].id%>" style="display:none; margin-top:10px;"> |
---|
61 | <h3>Erros</h3> |
---|
62 | <div> |
---|
63 | Erros encontrados |
---|
64 | </div> |
---|
65 | </div> |
---|
66 | |
---|
67 | <!-- Resposta do Metodo --> |
---|
68 | <div id="return_<%=resources[i].id%>" style="display:none"> |
---|
69 | <h3>Resposta do Método</h3> |
---|
70 | <div> |
---|
71 | Retorno |
---|
72 | </div> |
---|
73 | </div> |
---|
74 | |
---|
75 | </div> |
---|
76 | <% } %> |
---|
77 | </div> |
---|
78 | <% } %> |
---|