spring-attic / rest-shell

Command-line shell for interacting with Spring HATEOAS-compliant REST resources
Apache License 2.0
455 stars 100 forks source link

`delete` cannot be executed without a `--rel` argument. #15

Closed nebhale closed 12 years ago

nebhale commented 12 years ago

Currently, executing the delete command requires the --rel argument to be specified. This means that you cannot do the following to delete a resource and verify that it is deleted.

follow foo
delete
get

The delete command should be allowed to run from any URI without the --rel argument specified and should simply execute an HTTP DELETE on the current URI. The --rel behavior should be preserved as-is.

jbrisbin commented 12 years ago

It's not the --rel that's required but an argument of some kind. --rel is actually a convenience switch because the PathOrRel object that is the first parameter to the delete command figures out whether it's being passed a rel value or an actual path.

But it would be easier (and more consistent with the other commands) to not require a path or rel value on delete. I think it's as easy a fix as turning the mandatory switch to false.

nebhale commented 12 years ago

Has the forked code mentioned in #10 made it back into spring-shell yet?

/cc @markpollack

jbrisbin commented 12 years ago

Just created a PR for that https://github.com/SpringSource/spring-shell/pull/3