forked from loafle/openapi-generator-original
flatten methods replaces original ObjectProperty objects with new RefProperty objects which required variables are false as default. Newly created objects' required variables are set as the original property.