java - Create PUT and POST endpoints in a REST API, without creating a GET endpoint? -
i writing endpoints resource items
, subresource of applications
, this: applications/{:id}/items
. both, items , applications have other properties apart name.
i have created
get applications/{:applicationid}/items
- returns list of items belong applicationpost applications/{:applicationid}/items
- creates item applicationput applications/{:applicationid}/items/{:itemnumber}
- updates item of application
the clients interested see list of items application , not individual items, team thinks creating endpoint
get applications/{:applicationid}/items/{:itemnumber}
is unnecessary. wondering if bad idea not create such endpoint considering have post
, put
endpoints same resource.
it acceptable create put without matching get.
if find need @ later date can add it; if create before need it, carrying code neither needed nor used, still have maintain , test it.
if don't want test or maintain it, should delete it.
there no bugs in deleted code
Comments
Post a Comment