Somebody mentioning “The Princess Bride” by Goldman, purportedly based on the Florentine novel by S. Morgenstern got me thinking. Morgenstern is, of course, entirely fictional, being a device used by Goldman, who fleshed out some of his “biography” in the interludes of the story.
Off the top of my head, other instances of gags perpetrated by authors attributing work to fictional characters created by them or other writers:
Phillip Jose Farmer writing “Venus on the Half Shell” under “Kilgore Trout”, from Vonnegut’s character, with the initial permission of Vonnegut, who eventually regretted going along with the gag.
Tim Powers and James Blaylock’s running “William Ashbless” gag. I first came across “William Ashbless” in Powers’ “Anubis Gates” and actually had to poke around a bit to figure out that there really wasn’t some obscure 19th century poet named William Ashbless, whose works were actually excerpted in the novel.
Harlan Ellison writing under the name “Cordwainer Bird” when he wanted to disinherit a work. Then inserting Cordwainer Bird into a story - “New York Review of the Bird”. “Cordwainer Bird”, of course, being a sort of perverse homage to “Cordwainer Smith”, the pen name of Paul Linebarger.
Others? It should be good enough to have actually generated some confusion as to whether the fictional “author” was actually real or who was really doing the writing. So I might discount George MacDonald Fraser’s footnotes as himself making scholarly comments on his presentations of Flashman’s “memoirs”, for instance. That might of counted had Fraser decided to publish the things with authorship by “Harry Flashman, (edited by George MacDonald Fraser)” on the front cover.