In addition to the massive amounts of scholarly works that have been done on James Boswell, several authors have also found inspiration in Boswell and his relationship with Johnson when writing works of fiction.
Until recently, the best-known example was probably Lillian de la Torre's series of short stories about Dr. Sam: Johnson, Detector, the first of which was published in 1948, but more recent examples also exist, which you can find here.
Dr. Sam: Johnson, Detector
Long title
Dr. Sam: Johnson, Detector - Narrated as From the Pen of James Boswell
Year of 1st publication
1948
Literature
The Fall of the House of Thomas Weir
Long title
The Fall of the House of Thomas Weir
Year of 1st publication
2021