It is a flask internal property, I am not really comfortable with overriding/patching it. We could do it in the wrapper just before but I think it would render the code even more complex to read.
For now I pushed the code block clearly in the api_explorer code path and removed the superfluous None check f8a94f785c088fd5c3b643492f706dfdb7b35c5f