spring-petclinic icon indicating copy to clipboard operation
spring-petclinic copied to clipboard

Removal of the showResourcesVetList method dead code

Open arey opened this issue 10 months ago • 1 comments

Cause no more JSON and XML export feature

arey avatar Mar 13 '25 07:03 arey

Why is it dead code? Is there a bug in the @GetMapping (works for me)?

dsyer avatar Mar 26 '25 08:03 dsyer

The UI menu references the GET /vets.html?page=1 endpoint (within the showVetList method of the VetController), not the /vets one. Thus I think we could remove the unused showResourcesVetList method.

arey avatar Apr 09 '25 15:04 arey

The UI is clearly meant to show HTML. The /vets endpoint still works (and gives you JSON or XML depending on what you ask it for). I think that was the purpose of the code that you proposed to remove, so I think it's worth keeping.

dsyer avatar Apr 09 '25 15:04 dsyer

The /vets endpoint works, but is no longer used by the UI. If you remember we have those links for XML and JSON rendering : view-as-xml-or-json From my point of view, we don't need to keep that kind of dead code. It might disappoint some developers.

arey avatar Apr 12 '25 08:04 arey

Maybe we should put the links back? Or at least add some instructions about how to get the XML and JSON?

dsyer avatar Apr 12 '25 09:04 dsyer