Fictional works that are revealed to be fictionally fictional

Likely spoiler warning, since this is a question about endings

Apologies for the clumsy title.

Are there any notable works of fiction in which there’s a revelation at the end that the bulk of the work is canonically false? None of it happened, just a lie being told by a character within the world? The version in my head would be, say, a novel with a framing narrative of a character telling a story, but said character revealing at/toward the end that he’s been lying the whole time.

I don’t want to include “it was all a dream” scenarios (say, the film version of Wizard of Oz) or simple unreliable narrators. A work of fiction (like a book or story) within another fictional work might count, but only if the nature of the sub-work is only revealed at the end.

I’ll admit I’m partly asking because I’m currently reading John Dies at the End, and it occurred to me that such an ending would be pretty in-character for the book.

The Usual Suspects sort of fits this, much of the story happened just not at all like it was told to the detective.

The Usual Suspects. Keyser Soze mocks the police for two hours and then strolls right out from under their noses.

There’s an episode of Voyager where the ship is destroyed and the crew dies…except it turns out to be an exact duplicate of the “real” ship/crew, created by mumble-tech-babble on one of the weird planets they visted…

I suppose the Life of Pi would count, depending on how ambiguous you thought the ending was.

I thought of The Usual Suspects, but unless I’m misremembering, everything he tells them is correct and happened as described, he’s just leaving out a big, big detail.

The scenario I’m looking for is more of an intentional challenge to the audience – most of what you just read / watched didn’t happen.

That’s the beauty of it. Most of it didn’t happen. But enough of the story beats did happen that if anyone doublechecked Verbal’s story, it would check out until he got to leave.

Life of Pi immediately came to mind.

The Nested Story Reveal appears to be the TV trope that you want.

The beauty of it is that we really don’t know if ANYTHING he told the FBI Agent was true. The only thing we know for sure is that the guys were killed hitting that boat. We don’t know if the story of how they got together was true, we don’t know if the New York’s Finest Taxi Service story ever happened, we don’t know if he actually threatened their loved ones to get them to do the job, we don’t know anything.

Princess Bride? Does that count?

A Beautiful Mind and Ender’s Game have elements of this in them.

Possibly The Adventures of Baron Munchausen.

Total Recall.

That’s the first one I thought of. The framing story is very different in the book than in the movie, and the book never admits that the nested story of Westley and Buttercup is not the real work of S. Morgenstern.
How about The Twilight Zone? Rod Serling starts and ends each episode with the tacit admission that what we’re watching takes place in some nebulous, fictional reality, although there is one episode where he interacts with, and is essentially erased by, one of the characters within the story.

Cordwainer Smith’s short story, “The Crime and Glory of Commander Suzdal.”

The final two lines are:
“That’s the story.
Furthermore, it isn’t true.”

However, this ending is set up so that it might be disinformation from the Instrumentality.

Saki’s “The Open Window” should fit the bill (Note: in this context, “romance” means “wild exaggeration.”

Roseanne?

American Psycho?

This would be sort of the opposite of what you’re looking for, in that large parts of the story are being left out of the book because they were (probably) tall tales: In Heinlein’s Time Enough for Love, a 2,000-year-old man is telling the story of his life to an AI, which is going to transcribe them all for posterity. Whether or not they make their way into “print” (the book) is dependent on how much the AI believes them to be true; there are several points where Lazarus takes off into a new story and the AI inserts something along the lines of [7,500 words omitted].

The events in the movie Deathtrap turned out to actually be a stage play titled Deathtrap.

Pretty famously the awful 1965 movie Monster a Go-go

The Fellini film And the Ship Sails On from 12983: