From befa13dcdd118b459ada012e8b4893b238b4c0a8 Mon Sep 17 00:00:00 2001 From: Daniel D'Angelo Resende Barros Date: Sun, 4 Apr 2021 19:18:54 -0300 Subject: [PATCH] Adding API Swagger JSON --- src/app/api/swagger.json | 231 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 231 insertions(+) create mode 100644 src/app/api/swagger.json diff --git a/src/app/api/swagger.json b/src/app/api/swagger.json new file mode 100644 index 0000000..5ece389 --- /dev/null +++ b/src/app/api/swagger.json @@ -0,0 +1,231 @@ +{ + "swagger":"2.0", + "info":{ + "description":"\"Spring Boot REST API for WPD-MobileApp\"", + "version":"1.0.0", + "title":"Spring Boot REST API", + "license":{ + "name":"MIT License", + "url":"https://opensource.org/licenses/MIT" + } + }, + "host":"localhost:8080", + "basePath":"/", + "tags":[ + { + "name":"users-controller", + "description":"Users Controller" + }, + { + "name":"fields-answers-controller", + "description":"Fields Answers Controller" + } + ], + "paths":{ + "/fieldsanswers":{ + "get":{ + "tags":[ + "fields-answers-controller" + ], + "summary":"findAllByUserInformer", + "operationId":"findAllByUserInformerUsingGET", + "consumes":[ + "application/json" + ], + "produces":[ + "*/*" + ], + "parameters":[ + { + "in":"body", + "name":"idUserInformer", + "description":"idUserInformer", + "required":false, + "schema":{ + "type":"integer", + "format":"int32" + } + } + ], + "responses":{ + "200":{ + "description":"OK", + "schema":{ + "$ref":"#/definitions/Iterable«FieldsAnswers»" + } + }, + "401":{ + "description":"Unauthorized" + }, + "403":{ + "description":"Forbidden" + }, + "404":{ + "description":"Not Found" + } + } + }, + "post":{ + "tags":[ + "fields-answers-controller" + ], + "summary":"addAll", + "operationId":"addAllUsingPOST", + "consumes":[ + "application/json" + ], + "produces":[ + "*/*" + ], + "parameters":[ + { + "in":"body", + "name":"formcode", + "description":"formcode", + "required":false, + "schema":{ + "type":"string" + } + }, + { + "in":"body", + "name":"listDTO", + "description":"listDTO", + "required":false, + "schema":{ + "type":"array", + "items":{ + "$ref":"#/definitions/FieldsAnswersDTO" + } + } + } + ], + "responses":{ + "200":{ + "description":"OK" + }, + "201":{ + "description":"Created" + }, + "401":{ + "description":"Unauthorized" + }, + "403":{ + "description":"Forbidden" + }, + "404":{ + "description":"Not Found" + } + } + } + }, + "/users":{ + "get":{ + "tags":[ + "users-controller" + ], + "summary":"findByEmail", + "operationId":"findByEmailUsingGET", + "consumes":[ + "application/json" + ], + "produces":[ + "*/*" + ], + "parameters":[ + { + "in":"body", + "name":"email", + "description":"email", + "required":false, + "schema":{ + "type":"string" + } + } + ], + "responses":{ + "200":{ + "description":"OK", + "schema":{ + "$ref":"#/definitions/Users" + } + }, + "401":{ + "description":"Unauthorized" + }, + "403":{ + "description":"Forbidden" + }, + "404":{ + "description":"Not Found" + } + } + } + } + }, + "definitions":{ + "Iterable«FieldsAnswers»":{ + "type":"object" + }, + "FieldsAnswers":{ + "type":"object", + "properties":{ + "active":{ + "type":"integer", + "format":"int32" + }, + "dtfilling":{ + "type":"string" + }, + "id":{ + "type":"integer", + "format":"int32" + }, + "idUsersInformer":{ + "type":"integer", + "format":"int32" + }, + "idfields":{ + "type":"integer", + "format":"int32" + }, + "latitude":{ + "type":"number", + "format":"float" + }, + "longitude":{ + "type":"number", + "format":"float" + }, + "value":{ + "type":"string" + } + } + }, + "Users":{ + "type":"object", + "properties":{ + "active":{ + "type":"integer", + "format":"int32" + }, + "avatar":{ + "type":"string" + }, + "email":{ + "type":"string" + }, + "firstname":{ + "type":"string" + }, + "id":{ + "type":"integer", + "format":"int32" + }, + "surname":{ + "type":"string" + } + } + } + } + } \ No newline at end of file