As I have discussed elsewhere in the context of chivalry, how medieval knights and nobles would have liked to imagine themselves was presented in their own time in epics and romances.
These forms of literature began in the late eleventh or twelfth century (epics slightly earlier), and were equivalent in some ways to what we now think of as fantasy: larger than life characters having great adventures, with a serious admixture of the marvelous. Then, this was literature, not just a genre.
The distinction between the two forms of literature (epic and romance) is really a modern one, because the categories were not entirely separate. As a group, epics focused much more on battles and glorious deeds. Wars, fights to the death, loyalty, and bravery in the face of overwhelming odds featured heavily. The "Song of Roland" is probably the best known epic today, but there were plenty of others.
The "William of Orange" epics were very popular, based, as was "Roland," on some real figures of the ninth century who had been turned into legend--and who were depicted with twelfth-century armor and weapons and living in twelfth-century castles. Although epics tended to be male-centered, in most of the "William of Orange"stories women played a major role, often being the only ones in sight with their heads on straight.
Romances, on the other hand, always featured women. Although we now think of a romance as a love story, where the couple ends up happily ever after, a medieval romance was a story that did not focus almost exclusively on fighting. (The modern French word roman, meaning novel, comes from "romance.") The best known of these are the Arthurian romances of Chrétien de Troyes. He essentially invented what we think of as King Arthur, including the love triangle with Lancelot, the quest of the Holy Grail, and the like.
As well as glorifying knights and nobles, epics and romances also critiqued them. In "Roland," the hero (Roland) is undoubtedly brave and true, but his excessive pride loses the king half his army. In "William of Orange," William would have been destroyed multiple times if not for women coming in to save the day. Chrétien de Troyes condemned adultery even while introducing Lancelot's adulterous affair with Guinevere. And in the "Romance of the Rose" the lovers enjoying themselves with fornication are clearly going to hell.
Medieval authors were subtle. On the one hand, their stories were exciting and fun to read or hear. On the other hand, the authors worked in all sorts of criticism of the aristocracy, if anyone was paying attention.