What about
ResourceSpace.Has.ResourcesOfType<Document>()
.AtUri("/documents/{id}")
.HandledBy<DocumentHandler>()
.TranscodedBy<DocumentXmlCodec>()
.And.AtUri("/documents")
.HandledBy<DocumentCreationHandler>();
Then just make your GET on DocumentCreationHandler return string, and you're away.
Occasionally, when using a setup like this, I get conflicts between URIs, and I've found that named URIs offer a good way to disambiguate, as in
ResourceSpace.Has.ResourcesOfType<Document>()
.AtUri("/documents/{id}").Named("document-uri")
.HandledBy<DocumentHandler>()
.TranscodedBy<DocumentXmlCodec>()
.And.AtUri("/documents").Named("document-creation-uri")
.HandledBy<DocumentCreationHandler>();
public class DocumentCreationHandler
{
[HttpOperation(ForUriName = "document-creation-uri", Method="GET")]
public string GetInstructions() {}
[HttpOperation(ForUriName = "document-creation-uri", Method="POST")]
public OperationResult CreateDocument(Document doc) {}
}
--
Q. How many members of a demographic group does it take to perform a specified task?
A. A finite number; one to perform the task, and the remainder to act in a manner stereotypical of the group in question.