This may be an odd file structure, but I believe it is legal. The main yaml references a schema in a different file. If the top level element in that file is any property of JsonSchema, (e.g., title, maximum, parent, etc), document parsing fails. I used Title in this example, and basically, instead of adding a schema "Title" to JsonSchema.ExtensionData, it tries to set JsonSchema.Title.
This was first reported in NSwag as RicoSuter/NSwag#3341
Rather than paste files here I have submitted #1336 with a failing test the illustrate the problem. I don't have a good idea how to solve it. It seems like it would require ExtensionDataDeserializationConverter.ReadJson() to understand when it was being invoked in the context of resolving an external $ref, and with objectType == JsonSchema, and having special handling for properties of JSonSchema