Browse Source

Adding API Swagger JSON

master
Daniel D'Angelo Resende Barros 4 years ago
parent
commit
befa13dcdd
  1. 231
      src/app/api/swagger.json

231
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"
}
}
}
}
}
Loading…
Cancel
Save