Skip to content

Remove the POST endpoint from the /api/pets ressource#216

Merged
arey merged 3 commits intospring-petclinic:masterfrom
peterfk:pet-post-error
Apr 11, 2025
Merged

Remove the POST endpoint from the /api/pets ressource#216
arey merged 3 commits intospring-petclinic:masterfrom
peterfk:pet-post-error

Conversation

@peterfk
Copy link
Copy Markdown
Contributor

@peterfk peterfk commented Apr 6, 2025

#139 simplify the API by removing the POST to the /petclinic/api/pets ressource.

peterfk added 3 commits April 4, 2025 16:29
…ot include a foreign key to the owners table and causes an error. The resource POST to /petclinic/api/owners/{id}/pets does work since it includes the owner foreign key
@arey
Copy link
Copy Markdown
Member

arey commented Apr 9, 2025

Thanks @peterfk for your contribution.
I let @alexandre-touret @vfedoriv and @breedx-splk have a look

Copy link
Copy Markdown
Contributor

@breedx-splk breedx-splk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That works for me and is aligned with the discussion in the original issue.

The workaround is to POST to /petclinic/api/owners/{id}/pets instead. 🚀

@alexandre-touret
Copy link
Copy Markdown
Contributor

HI
OK for me

@arey arey changed the title Pet post error Remove the POST endpoint from the /api/pets ressource Apr 11, 2025
@arey arey merged commit 310a844 into spring-petclinic:master Apr 11, 2025
1 check passed
@peterfk peterfk deleted the pet-post-error branch April 14, 2025 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants