Commit 1b5445d036bd830f01c56d28dccd6ab8a2507c12
Exists in
master
Merge branch 'branch_homologacao'
Corrige conflito do merge com o branch_homolog
Showing
6 changed files
with
412 additions
and
65 deletions
Show diff stats
pom.xml
| ... | ... | @@ -3,7 +3,7 @@ |
| 3 | 3 | <modelVersion>4.0.0</modelVersion> |
| 4 | 4 | <groupId>br.gov.ans</groupId> |
| 5 | 5 | <artifactId>templates-broker</artifactId> |
| 6 | - <version>1.2</version> | |
| 6 | + <version>1.1</version> | |
| 7 | 7 | <packaging>war</packaging> |
| 8 | 8 | <name>templates-broker</name> |
| 9 | 9 | <description>Sistema de gerenciamento de templates.</description> | ... | ... |
| ... | ... | @@ -0,0 +1,21 @@ |
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<datasources> | |
| 3 | + <datasource jta="true" jndi-name="java:/jdbc/templates" pool-name="jdbc/templates" enabled="true" use-java-context="true" use-ccm="true"> | |
| 4 | + <connection-url>${br.gov.ans.templates.db.connectionUrl}</connection-url> | |
| 5 | + <driver-class>br.gov.ans.framework.jdbc.AnsOracleDriver</driver-class> | |
| 6 | + <driver>ans</driver> | |
| 7 | + <security> | |
| 8 | + <user-name>USUARIO_GETD</user-name> | |
| 9 | + <password>${br.gov.ans.templates.db.password}</password> | |
| 10 | + </security> | |
| 11 | + <timeout> | |
| 12 | + <idle-timeout-minutes>2</idle-timeout-minutes> | |
| 13 | + </timeout> | |
| 14 | + <validation> | |
| 15 | + <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleValidConnectionChecker"/> | |
| 16 | + <background-validation>true</background-validation> | |
| 17 | + <stale-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleStaleConnectionChecker"/> | |
| 18 | + <exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleExceptionSorter"/> | |
| 19 | + </validation> | |
| 20 | + </datasource> | |
| 21 | +</datasources> | |
| 0 | 22 | \ No newline at end of file | ... | ... |
src/main/webapp/api-docs/api_data.js
| ... | ... | @@ -23,36 +23,8 @@ define({ "api": [ |
| 23 | 23 | "url": "", |
| 24 | 24 | "version": "0.0.0", |
| 25 | 25 | "filename": "templates-broker/src/main/webapp/api-docs/main.js", |
| 26 | - "group": "C__ANS_ans_templates_templates_broker_src_main_webapp_api_docs_main_js", | |
| 27 | - "groupTitle": "C__ANS_ans_templates_templates_broker_src_main_webapp_api_docs_main_js", | |
| 28 | - "name": "" | |
| 29 | - }, | |
| 30 | - { | |
| 31 | - "success": { | |
| 32 | - "fields": { | |
| 33 | - "Success 200": [ | |
| 34 | - { | |
| 35 | - "group": "Success 200", | |
| 36 | - "optional": false, | |
| 37 | - "field": "varname1", | |
| 38 | - "description": "<p>No type.</p>" | |
| 39 | - }, | |
| 40 | - { | |
| 41 | - "group": "Success 200", | |
| 42 | - "type": "String", | |
| 43 | - "optional": false, | |
| 44 | - "field": "varname2", | |
| 45 | - "description": "<p>With type.</p>" | |
| 46 | - } | |
| 47 | - ] | |
| 48 | - } | |
| 49 | - }, | |
| 50 | - "type": "", | |
| 51 | - "url": "", | |
| 52 | - "version": "0.0.0", | |
| 53 | - "filename": "templates-broker/target/templates-broker-0.1/api-docs/main.js", | |
| 54 | - "group": "C__ANS_ans_templates_templates_broker_target_templates_broker_0_1_api_docs_main_js", | |
| 55 | - "groupTitle": "C__ANS_ans_templates_templates_broker_target_templates_broker_0_1_api_docs_main_js", | |
| 26 | + "group": "C__git_templates_broker_src_main_webapp_api_docs_main_js", | |
| 27 | + "groupTitle": "C__git_templates_broker_src_main_webapp_api_docs_main_js", | |
| 56 | 28 | "name": "" |
| 57 | 29 | }, |
| 58 | 30 | { |
| ... | ... | @@ -442,7 +414,7 @@ define({ "api": [ |
| 442 | 414 | "examples": [ |
| 443 | 415 | { |
| 444 | 416 | "title": "Exemplo de requisição:\t", |
| 445 | - "content": "\tendpoint: [PUT] http://<host>/templates-broker/service/templates/confirmacao-cadastro\n\n\tbody:\n {\n \"corpo\": \"Prezado {{fulano}}, seu cadastro foi realizado com sucesso.\",\n \"descricao\": \"Template de confirmação de cadastro.\",\n \"exemplo\": \"{\"fulano\":\"André Guimarães\"}\",\n \"nome\": \"confirmacao-cadastro\",\n \"responsavel\": \"andre.guimaraes\",\n \"restrito\": true,\n }", | |
| 417 | + "content": "\tendpoint: [POST] http://<host>/templates-broker/service/templates/confirmacao-cadastro\n\n\tbody:\n {\n \"corpo\": \"Prezado {{fulano}}, seu cadastro foi realizado com sucesso.\",\n \"descricao\": \"Template de confirmação de cadastro.\",\n \"exemplo\": \"{\"fulano\":\"André Guimarães\"}\",\n \"nome\": \"confirmacao-cadastro\",\n \"responsavel\": \"andre.guimaraes\",\n \"restrito\": true,\n }", | |
| 446 | 418 | "type": "json" |
| 447 | 419 | } |
| 448 | 420 | ], |
| ... | ... | @@ -1070,5 +1042,196 @@ define({ "api": [ |
| 1070 | 1042 | }, |
| 1071 | 1043 | "filename": "templates-broker/src/main/java/br/gov/ans/templates/rest/TemplateResource.java", |
| 1072 | 1044 | "groupTitle": "Template" |
| 1045 | + }, | |
| 1046 | + { | |
| 1047 | + "type": "get", | |
| 1048 | + "url": "/templates", | |
| 1049 | + "title": "Listar templates excluídos", | |
| 1050 | + "name": "listTemplatesExcluidos", | |
| 1051 | + "group": "Template", | |
| 1052 | + "version": "1.0.0", | |
| 1053 | + "permission": [ | |
| 1054 | + { | |
| 1055 | + "name": "RO_ADMIN_TEMPLATE, RO_USUARIO_TEMPLATE" | |
| 1056 | + } | |
| 1057 | + ], | |
| 1058 | + "description": "<p>Consulta os templates que foram excluídos.</p>", | |
| 1059 | + "parameter": { | |
| 1060 | + "fields": { | |
| 1061 | + "Query Parameters": [ | |
| 1062 | + { | |
| 1063 | + "group": "Query Parameters", | |
| 1064 | + "type": "String", | |
| 1065 | + "optional": true, | |
| 1066 | + "field": "filtro", | |
| 1067 | + "description": "<p>Valor utilizado para filtrar os templates.</p>" | |
| 1068 | + }, | |
| 1069 | + { | |
| 1070 | + "group": "Query Parameters", | |
| 1071 | + "type": "String", | |
| 1072 | + "optional": true, | |
| 1073 | + "field": "itens", | |
| 1074 | + "defaultValue": "20", | |
| 1075 | + "description": "<p>Quantidade de templates que serão exibidos</p>" | |
| 1076 | + }, | |
| 1077 | + { | |
| 1078 | + "group": "Query Parameters", | |
| 1079 | + "type": "String", | |
| 1080 | + "optional": true, | |
| 1081 | + "field": "pag", | |
| 1082 | + "defaultValue": "1", | |
| 1083 | + "description": "<p>Número da página</p>" | |
| 1084 | + } | |
| 1085 | + ] | |
| 1086 | + } | |
| 1087 | + }, | |
| 1088 | + "examples": [ | |
| 1089 | + { | |
| 1090 | + "title": "Exemplo de requisição:\t", | |
| 1091 | + "content": "curl -i http://<host>/templates-broker/service/templates", | |
| 1092 | + "type": "json" | |
| 1093 | + } | |
| 1094 | + ], | |
| 1095 | + "success": { | |
| 1096 | + "fields": { | |
| 1097 | + "Sucesso - 200": [ | |
| 1098 | + { | |
| 1099 | + "group": "Sucesso - 200", | |
| 1100 | + "type": "List", | |
| 1101 | + "optional": false, | |
| 1102 | + "field": "resultado", | |
| 1103 | + "description": "<p>Lista com os templates encontrados.</p>" | |
| 1104 | + }, | |
| 1105 | + { | |
| 1106 | + "group": "Sucesso - 200", | |
| 1107 | + "type": "Template", | |
| 1108 | + "optional": false, | |
| 1109 | + "field": "resultado.template", | |
| 1110 | + "description": "<p>Objeto representando o template.</p>" | |
| 1111 | + }, | |
| 1112 | + { | |
| 1113 | + "group": "Sucesso - 200", | |
| 1114 | + "type": "String", | |
| 1115 | + "optional": false, | |
| 1116 | + "field": "resultado.template.corpo", | |
| 1117 | + "description": "<p>Corpo do template, conteúdo que as aplicações usarão para preencher e exibir os dados.</p>" | |
| 1118 | + }, | |
| 1119 | + { | |
| 1120 | + "group": "Sucesso - 200", | |
| 1121 | + "type": "String", | |
| 1122 | + "optional": false, | |
| 1123 | + "field": "resultado.template.dataCadastro", | |
| 1124 | + "description": "<p>Data de cadastro do template.</p>" | |
| 1125 | + }, | |
| 1126 | + { | |
| 1127 | + "group": "Sucesso - 200", | |
| 1128 | + "type": "String", | |
| 1129 | + "optional": false, | |
| 1130 | + "field": "resultado.template.descricao", | |
| 1131 | + "description": "<p>Descrição do template.</p>" | |
| 1132 | + }, | |
| 1133 | + { | |
| 1134 | + "group": "Sucesso - 200", | |
| 1135 | + "type": "String", | |
| 1136 | + "optional": false, | |
| 1137 | + "field": "resultado.template.exemplo", | |
| 1138 | + "description": "<p>Exemplo de request para preenchimento do template.</p>" | |
| 1139 | + }, | |
| 1140 | + { | |
| 1141 | + "group": "Sucesso - 200", | |
| 1142 | + "type": "String", | |
| 1143 | + "optional": false, | |
| 1144 | + "field": "resultado.template.nome", | |
| 1145 | + "description": "<p>Identificador do template</p>" | |
| 1146 | + }, | |
| 1147 | + { | |
| 1148 | + "group": "Sucesso - 200", | |
| 1149 | + "type": "String", | |
| 1150 | + "optional": false, | |
| 1151 | + "field": "resultado.template.responsavel", | |
| 1152 | + "description": "<p>Analista responsável pelo template.</p>" | |
| 1153 | + }, | |
| 1154 | + { | |
| 1155 | + "group": "Sucesso - 200", | |
| 1156 | + "type": "Boolean", | |
| 1157 | + "optional": false, | |
| 1158 | + "field": "resultado.template.restrito", | |
| 1159 | + "description": "<p>Flag identificando se a atualização deste template é restrita.</p>" | |
| 1160 | + } | |
| 1161 | + ] | |
| 1162 | + }, | |
| 1163 | + "examples": [ | |
| 1164 | + { | |
| 1165 | + "title": "Success-Response:", | |
| 1166 | + "content": "HTTP/1.1 200 OK\n{\n \"corpo\": \"Prezado {{fulano}}, seu cadastro foi realizado com sucesso.\",\n \"dataCadastro\": \"2017-03-14T16:57:47.405-03:00\",\n \"descricao\": \"Template de confirmação de cadastro.\",\n \"exemplo\": \"{\"fulano\":\"André Guimarães\"}\",\n \"nome\": \"confirmacao-cadastro\",\n \"responsavel\": \"andre.guimaraes\",\n \"restrito\": false,\n \"dataExclusao\":\"2017-08-14T16:57:47.405-03:00\"\n}", | |
| 1167 | + "type": "json" | |
| 1168 | + } | |
| 1169 | + ] | |
| 1170 | + }, | |
| 1171 | + "error": { | |
| 1172 | + "examples": [ | |
| 1173 | + { | |
| 1174 | + "title": "Error-Response:", | |
| 1175 | + "content": "HTTP/1.1 500 Internal Server Error\n{\n\t\"error\":\"Mensagem de erro.\"\n\t\"code\":\"código do erro\"\n}", | |
| 1176 | + "type": "json" | |
| 1177 | + } | |
| 1178 | + ] | |
| 1179 | + }, | |
| 1180 | + "filename": "templates-broker/src/main/java/br/gov/ans/templates/rest/TemplateResource.java", | |
| 1181 | + "groupTitle": "Template" | |
| 1182 | + }, | |
| 1183 | + { | |
| 1184 | + "type": "delete", | |
| 1185 | + "url": "/templates/excluidos/:template", | |
| 1186 | + "title": "Recuperar template", | |
| 1187 | + "name": "undeleteTemplate", | |
| 1188 | + "group": "Template", | |
| 1189 | + "version": "1.0.0", | |
| 1190 | + "permission": [ | |
| 1191 | + { | |
| 1192 | + "name": "RO_ADMIN_TEMPLATE" | |
| 1193 | + } | |
| 1194 | + ], | |
| 1195 | + "description": "<p>Recupera um template excluído.</p>", | |
| 1196 | + "parameter": { | |
| 1197 | + "fields": { | |
| 1198 | + "Path Parameters": [ | |
| 1199 | + { | |
| 1200 | + "group": "Path Parameters", | |
| 1201 | + "type": "String", | |
| 1202 | + "optional": false, | |
| 1203 | + "field": "template", | |
| 1204 | + "description": "<p>Identificador do template</p>" | |
| 1205 | + } | |
| 1206 | + ] | |
| 1207 | + } | |
| 1208 | + }, | |
| 1209 | + "examples": [ | |
| 1210 | + { | |
| 1211 | + "title": "Exemplo de requisição:\t", | |
| 1212 | + "content": "curl -X DELETE http://<host>/templates-broker/service/templates/excluidos/admp-template-novo-usuario", | |
| 1213 | + "type": "json" | |
| 1214 | + } | |
| 1215 | + ], | |
| 1216 | + "success": { | |
| 1217 | + "examples": [ | |
| 1218 | + { | |
| 1219 | + "title": "Success-Response:", | |
| 1220 | + "content": "HTTP/1.1 200 OK", | |
| 1221 | + "type": "json" | |
| 1222 | + } | |
| 1223 | + ] | |
| 1224 | + }, | |
| 1225 | + "error": { | |
| 1226 | + "examples": [ | |
| 1227 | + { | |
| 1228 | + "title": "Error-Response:", | |
| 1229 | + "content": "HTTP/1.1 500 Internal Server Error\n{\n\t\"error\":\"Mensagem de erro.\"\n\t\"code\":\"código do erro\"\n}", | |
| 1230 | + "type": "json" | |
| 1231 | + } | |
| 1232 | + ] | |
| 1233 | + }, | |
| 1234 | + "filename": "templates-broker/src/main/java/br/gov/ans/templates/rest/TemplateResource.java", | |
| 1235 | + "groupTitle": "Template" | |
| 1073 | 1236 | } |
| 1074 | 1237 | ] }); | ... | ... |
src/main/webapp/api-docs/api_data.json
| ... | ... | @@ -23,36 +23,8 @@ |
| 23 | 23 | "url": "", |
| 24 | 24 | "version": "0.0.0", |
| 25 | 25 | "filename": "templates-broker/src/main/webapp/api-docs/main.js", |
| 26 | - "group": "C__ANS_ans_templates_templates_broker_src_main_webapp_api_docs_main_js", | |
| 27 | - "groupTitle": "C__ANS_ans_templates_templates_broker_src_main_webapp_api_docs_main_js", | |
| 28 | - "name": "" | |
| 29 | - }, | |
| 30 | - { | |
| 31 | - "success": { | |
| 32 | - "fields": { | |
| 33 | - "Success 200": [ | |
| 34 | - { | |
| 35 | - "group": "Success 200", | |
| 36 | - "optional": false, | |
| 37 | - "field": "varname1", | |
| 38 | - "description": "<p>No type.</p>" | |
| 39 | - }, | |
| 40 | - { | |
| 41 | - "group": "Success 200", | |
| 42 | - "type": "String", | |
| 43 | - "optional": false, | |
| 44 | - "field": "varname2", | |
| 45 | - "description": "<p>With type.</p>" | |
| 46 | - } | |
| 47 | - ] | |
| 48 | - } | |
| 49 | - }, | |
| 50 | - "type": "", | |
| 51 | - "url": "", | |
| 52 | - "version": "0.0.0", | |
| 53 | - "filename": "templates-broker/target/templates-broker-0.1/api-docs/main.js", | |
| 54 | - "group": "C__ANS_ans_templates_templates_broker_target_templates_broker_0_1_api_docs_main_js", | |
| 55 | - "groupTitle": "C__ANS_ans_templates_templates_broker_target_templates_broker_0_1_api_docs_main_js", | |
| 26 | + "group": "C__git_templates_broker_src_main_webapp_api_docs_main_js", | |
| 27 | + "groupTitle": "C__git_templates_broker_src_main_webapp_api_docs_main_js", | |
| 56 | 28 | "name": "" |
| 57 | 29 | }, |
| 58 | 30 | { |
| ... | ... | @@ -442,7 +414,7 @@ |
| 442 | 414 | "examples": [ |
| 443 | 415 | { |
| 444 | 416 | "title": "Exemplo de requisição:\t", |
| 445 | - "content": "\tendpoint: [PUT] http://<host>/templates-broker/service/templates/confirmacao-cadastro\n\n\tbody:\n {\n \"corpo\": \"Prezado {{fulano}}, seu cadastro foi realizado com sucesso.\",\n \"descricao\": \"Template de confirmação de cadastro.\",\n \"exemplo\": \"{\"fulano\":\"André Guimarães\"}\",\n \"nome\": \"confirmacao-cadastro\",\n \"responsavel\": \"andre.guimaraes\",\n \"restrito\": true,\n }", | |
| 417 | + "content": "\tendpoint: [POST] http://<host>/templates-broker/service/templates/confirmacao-cadastro\n\n\tbody:\n {\n \"corpo\": \"Prezado {{fulano}}, seu cadastro foi realizado com sucesso.\",\n \"descricao\": \"Template de confirmação de cadastro.\",\n \"exemplo\": \"{\"fulano\":\"André Guimarães\"}\",\n \"nome\": \"confirmacao-cadastro\",\n \"responsavel\": \"andre.guimaraes\",\n \"restrito\": true,\n }", | |
| 446 | 418 | "type": "json" |
| 447 | 419 | } |
| 448 | 420 | ], |
| ... | ... | @@ -1070,5 +1042,196 @@ |
| 1070 | 1042 | }, |
| 1071 | 1043 | "filename": "templates-broker/src/main/java/br/gov/ans/templates/rest/TemplateResource.java", |
| 1072 | 1044 | "groupTitle": "Template" |
| 1045 | + }, | |
| 1046 | + { | |
| 1047 | + "type": "get", | |
| 1048 | + "url": "/templates", | |
| 1049 | + "title": "Listar templates excluídos", | |
| 1050 | + "name": "listTemplatesExcluidos", | |
| 1051 | + "group": "Template", | |
| 1052 | + "version": "1.0.0", | |
| 1053 | + "permission": [ | |
| 1054 | + { | |
| 1055 | + "name": "RO_ADMIN_TEMPLATE, RO_USUARIO_TEMPLATE" | |
| 1056 | + } | |
| 1057 | + ], | |
| 1058 | + "description": "<p>Consulta os templates que foram excluídos.</p>", | |
| 1059 | + "parameter": { | |
| 1060 | + "fields": { | |
| 1061 | + "Query Parameters": [ | |
| 1062 | + { | |
| 1063 | + "group": "Query Parameters", | |
| 1064 | + "type": "String", | |
| 1065 | + "optional": true, | |
| 1066 | + "field": "filtro", | |
| 1067 | + "description": "<p>Valor utilizado para filtrar os templates.</p>" | |
| 1068 | + }, | |
| 1069 | + { | |
| 1070 | + "group": "Query Parameters", | |
| 1071 | + "type": "String", | |
| 1072 | + "optional": true, | |
| 1073 | + "field": "itens", | |
| 1074 | + "defaultValue": "20", | |
| 1075 | + "description": "<p>Quantidade de templates que serão exibidos</p>" | |
| 1076 | + }, | |
| 1077 | + { | |
| 1078 | + "group": "Query Parameters", | |
| 1079 | + "type": "String", | |
| 1080 | + "optional": true, | |
| 1081 | + "field": "pag", | |
| 1082 | + "defaultValue": "1", | |
| 1083 | + "description": "<p>Número da página</p>" | |
| 1084 | + } | |
| 1085 | + ] | |
| 1086 | + } | |
| 1087 | + }, | |
| 1088 | + "examples": [ | |
| 1089 | + { | |
| 1090 | + "title": "Exemplo de requisição:\t", | |
| 1091 | + "content": "curl -i http://<host>/templates-broker/service/templates", | |
| 1092 | + "type": "json" | |
| 1093 | + } | |
| 1094 | + ], | |
| 1095 | + "success": { | |
| 1096 | + "fields": { | |
| 1097 | + "Sucesso - 200": [ | |
| 1098 | + { | |
| 1099 | + "group": "Sucesso - 200", | |
| 1100 | + "type": "List", | |
| 1101 | + "optional": false, | |
| 1102 | + "field": "resultado", | |
| 1103 | + "description": "<p>Lista com os templates encontrados.</p>" | |
| 1104 | + }, | |
| 1105 | + { | |
| 1106 | + "group": "Sucesso - 200", | |
| 1107 | + "type": "Template", | |
| 1108 | + "optional": false, | |
| 1109 | + "field": "resultado.template", | |
| 1110 | + "description": "<p>Objeto representando o template.</p>" | |
| 1111 | + }, | |
| 1112 | + { | |
| 1113 | + "group": "Sucesso - 200", | |
| 1114 | + "type": "String", | |
| 1115 | + "optional": false, | |
| 1116 | + "field": "resultado.template.corpo", | |
| 1117 | + "description": "<p>Corpo do template, conteúdo que as aplicações usarão para preencher e exibir os dados.</p>" | |
| 1118 | + }, | |
| 1119 | + { | |
| 1120 | + "group": "Sucesso - 200", | |
| 1121 | + "type": "String", | |
| 1122 | + "optional": false, | |
| 1123 | + "field": "resultado.template.dataCadastro", | |
| 1124 | + "description": "<p>Data de cadastro do template.</p>" | |
| 1125 | + }, | |
| 1126 | + { | |
| 1127 | + "group": "Sucesso - 200", | |
| 1128 | + "type": "String", | |
| 1129 | + "optional": false, | |
| 1130 | + "field": "resultado.template.descricao", | |
| 1131 | + "description": "<p>Descrição do template.</p>" | |
| 1132 | + }, | |
| 1133 | + { | |
| 1134 | + "group": "Sucesso - 200", | |
| 1135 | + "type": "String", | |
| 1136 | + "optional": false, | |
| 1137 | + "field": "resultado.template.exemplo", | |
| 1138 | + "description": "<p>Exemplo de request para preenchimento do template.</p>" | |
| 1139 | + }, | |
| 1140 | + { | |
| 1141 | + "group": "Sucesso - 200", | |
| 1142 | + "type": "String", | |
| 1143 | + "optional": false, | |
| 1144 | + "field": "resultado.template.nome", | |
| 1145 | + "description": "<p>Identificador do template</p>" | |
| 1146 | + }, | |
| 1147 | + { | |
| 1148 | + "group": "Sucesso - 200", | |
| 1149 | + "type": "String", | |
| 1150 | + "optional": false, | |
| 1151 | + "field": "resultado.template.responsavel", | |
| 1152 | + "description": "<p>Analista responsável pelo template.</p>" | |
| 1153 | + }, | |
| 1154 | + { | |
| 1155 | + "group": "Sucesso - 200", | |
| 1156 | + "type": "Boolean", | |
| 1157 | + "optional": false, | |
| 1158 | + "field": "resultado.template.restrito", | |
| 1159 | + "description": "<p>Flag identificando se a atualização deste template é restrita.</p>" | |
| 1160 | + } | |
| 1161 | + ] | |
| 1162 | + }, | |
| 1163 | + "examples": [ | |
| 1164 | + { | |
| 1165 | + "title": "Success-Response:", | |
| 1166 | + "content": "HTTP/1.1 200 OK\n{\n \"corpo\": \"Prezado {{fulano}}, seu cadastro foi realizado com sucesso.\",\n \"dataCadastro\": \"2017-03-14T16:57:47.405-03:00\",\n \"descricao\": \"Template de confirmação de cadastro.\",\n \"exemplo\": \"{\"fulano\":\"André Guimarães\"}\",\n \"nome\": \"confirmacao-cadastro\",\n \"responsavel\": \"andre.guimaraes\",\n \"restrito\": false,\n \"dataExclusao\":\"2017-08-14T16:57:47.405-03:00\"\n}", | |
| 1167 | + "type": "json" | |
| 1168 | + } | |
| 1169 | + ] | |
| 1170 | + }, | |
| 1171 | + "error": { | |
| 1172 | + "examples": [ | |
| 1173 | + { | |
| 1174 | + "title": "Error-Response:", | |
| 1175 | + "content": "HTTP/1.1 500 Internal Server Error\n{\n\t\"error\":\"Mensagem de erro.\"\n\t\"code\":\"código do erro\"\n}", | |
| 1176 | + "type": "json" | |
| 1177 | + } | |
| 1178 | + ] | |
| 1179 | + }, | |
| 1180 | + "filename": "templates-broker/src/main/java/br/gov/ans/templates/rest/TemplateResource.java", | |
| 1181 | + "groupTitle": "Template" | |
| 1182 | + }, | |
| 1183 | + { | |
| 1184 | + "type": "delete", | |
| 1185 | + "url": "/templates/excluidos/:template", | |
| 1186 | + "title": "Recuperar template", | |
| 1187 | + "name": "undeleteTemplate", | |
| 1188 | + "group": "Template", | |
| 1189 | + "version": "1.0.0", | |
| 1190 | + "permission": [ | |
| 1191 | + { | |
| 1192 | + "name": "RO_ADMIN_TEMPLATE" | |
| 1193 | + } | |
| 1194 | + ], | |
| 1195 | + "description": "<p>Recupera um template excluído.</p>", | |
| 1196 | + "parameter": { | |
| 1197 | + "fields": { | |
| 1198 | + "Path Parameters": [ | |
| 1199 | + { | |
| 1200 | + "group": "Path Parameters", | |
| 1201 | + "type": "String", | |
| 1202 | + "optional": false, | |
| 1203 | + "field": "template", | |
| 1204 | + "description": "<p>Identificador do template</p>" | |
| 1205 | + } | |
| 1206 | + ] | |
| 1207 | + } | |
| 1208 | + }, | |
| 1209 | + "examples": [ | |
| 1210 | + { | |
| 1211 | + "title": "Exemplo de requisição:\t", | |
| 1212 | + "content": "curl -X DELETE http://<host>/templates-broker/service/templates/excluidos/admp-template-novo-usuario", | |
| 1213 | + "type": "json" | |
| 1214 | + } | |
| 1215 | + ], | |
| 1216 | + "success": { | |
| 1217 | + "examples": [ | |
| 1218 | + { | |
| 1219 | + "title": "Success-Response:", | |
| 1220 | + "content": "HTTP/1.1 200 OK", | |
| 1221 | + "type": "json" | |
| 1222 | + } | |
| 1223 | + ] | |
| 1224 | + }, | |
| 1225 | + "error": { | |
| 1226 | + "examples": [ | |
| 1227 | + { | |
| 1228 | + "title": "Error-Response:", | |
| 1229 | + "content": "HTTP/1.1 500 Internal Server Error\n{\n\t\"error\":\"Mensagem de erro.\"\n\t\"code\":\"código do erro\"\n}", | |
| 1230 | + "type": "json" | |
| 1231 | + } | |
| 1232 | + ] | |
| 1233 | + }, | |
| 1234 | + "filename": "templates-broker/src/main/java/br/gov/ans/templates/rest/TemplateResource.java", | |
| 1235 | + "groupTitle": "Template" | |
| 1073 | 1236 | } |
| 1074 | 1237 | ] | ... | ... |
src/main/webapp/api-docs/api_project.js
src/main/webapp/api-docs/api_project.json