POST Owner doesn't create Pet nor Visits
See original GitHub issueI’m trying to POST a new “owner” with “pet” and “visit”: http://localhost:9966/petclinic/swagger-ui.html#!/owner-rest-controller/addOwnerUsingPOST
This is the JSON Body I am sending:
{
"address": "Fakestreet",
"city": "Langdorp",
"firstName": "Kristof",
"id": 0,
"lastName": "fakelastname",
"pets": [
{
"birthDate": "2000-08-13T06:32:56.478Z",
"id": 0,
"name": "Darko",
"owner": {},
"type": {
"id": 2,
"name": "dog"
},
"visits": [
{
"date": "2019/03/15",
"description": "Sick",
"id": 0,
"pet": {}
}
]
}
],
"telephone": "016565758"
}
I’m expecting the response so the Owner has been created, pet and visit also. (just like described on the swagger) Only the response I receive is:
{
"id": 16,
"firstName": "Kristof",
"lastName": "fakelastname",
"address": "Fakestreet",
"city": "Langdorp",
"telephone": "016565758",
"pets": []
}
I checked and it doesn’t create the pet nor visit in the backend.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Information for renters with pets
Review your lease. Typically if a lease does not mention pets at all, then you are allowed to have pets. Some communities and...
Read more >Visits from former owners: Good for Dogs? - The Other End of ...
Although I'm only speculating, I suspect it depends on how settled and stable the dog is in his or her new home. Here...
Read more >Pets and Service Animals - Tenant Resource Center
This is a special situation where the landlord's pet policy does not apply. A service animal or emotional support animal should not be...
Read more >Guilty or Innocent? Do pets know they have done something ...
Do they understand they've done something wrong when their owners get ... Here lies the evidence that your dog or cat is guilty...
Read more >FAQs on Service and Assistance Animals in Housing
Importantly, assistance animals are not considered pets and housing providers may not ... It does not have the force of law and the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @KristofVanKriekingen1337 Well, this endpoint shouldn’t save child objects( pet etc…). If you want to improve it, need changes in JacksonCustomOwnerDeserializer and OwnerRestController.
@arey yes, thanks