Sample Spring project for the BeanMapper libraries
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 17 commits ahead of robert-bor:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
README.md
pom.xml

README.md

beanmapper-petshop

Sample Spring project for the BeanMapper libraries

API

  • Get all pets (show only name and type) -> curl -X GET localhost:8080/api/pets
  • Get pet with id 1 -> curl -X GET localhost:8080/api/pets/1
  • Create a pet -> curl -X POST localhost:8080/api/pets
  • Update pet with id 1 -> curl -X PUT localhost:8080/api/pets/1
  • Partial update pet with id 1 -> curl -X PATCH localhost:8080/api/pets/1
  • Delete pet with id 1 -> curl -X DELETE localhost:8080/api/pets/1

Provide data for POST, PUT, PATCH request:

-H 'Content-Type: application/json' 
--data '{"nickname": "Graver", "birthDate": "2015-01-01", "sex": "MALE", "petTypeId": 2}'