Hi there,
Welcome to the new forums.
As you noticed, the Swagger 2 (or OAS2) spec doesn't specify a default value nor does it make it a mandatory field, making the processing a bit more challenging. This is one of the things we made sure are fixed with OpenAPI 3, making that disambiguation disappear.
What you end up doing in that case is up to you. Generally speaking, we do end up assuming "application/json", even though it's not necessarily correct.
As for the pet store definition itself - it's not perfect. The OpenAPI 3 version of the pet store will be more accurate. However, the current version also exhibits what might happen with real life APIs - they may not contain the important details, and the codegen still needs to handle these cases as best it can.
Hope this helps,
Ron