Inside the solution folder, there is a SpringBoot project using MongoDb, it has the basic functionality of list, register, update and delete Places in the database. The Project has already created two places registered in the database.
- https://springbootherokumongo.herokuapp.com
- https://springbootherokumongo.herokuapp.com/swagger-ui.html#/
- Will return the list of registered places
Response Body example:
[
{
"city": "string",
"createdAt": "string",
"id": "string",
"name": "string",
"slug": "string",
"state": "string",
"updatedAt": "string",
}
]
- Will return to list of registered places filtered by cities
Path parameters Parameter:city Description:city Parameter Type:query Data Type:String
Response Body example:
[
{
"city": "string",
"createdAt": "string",
"id": "string",
"name": "string",
"slug": "string",
"state": "string",
"updatedAt": "string",
}
]
- Will return to list of registered places filtered by name(or a part of the name)
Path parameters Parameter:slug Description:place name in slug format Parameter Type:path Data Type:String
Response Body example:
[
{
"city": "string",
"createdAt": "string",
"id": "string",
"name": "string",
"slug": "string",
"state": "string",
"updatedAt": "string",
}
]
-Will return a place object Path parameters Parameter:name Description:Place name Parameter Type:query Data Type:String
Response Body example:
{
"city": "string",
"createdAt": "string",
"id": "string",
"name": "string",
"slug": "string",
"state": "string",
"updatedAt": "string",
}
-#GET /places/{id} Will return a place dto, selected by id
Path parameters Parameter:id Description:the place id on database Parameter Type:path Data Type:String
Response Body example:
{
"city": "string",
"name": "string",
"state": "string"
}
- Will insert a place dto
Request Body Example:
{
"city": "string",
"name": "string",
"state": "string"
}
Response Body no content
- Will delete a place in database
Path parameters Parameter:id Description:the place id on database Parameter Type:path Data Type:String
- Will update Place by id
Path parameters Parameter:id Description:the place id on database Parameter Type:path Data Type:String
Response Body example:
{
"city": "string",
"name": "string",
"state": "string"
}