I pity the individual who gets stuck developing in magento. Everything is **bleep**ing broken and the documentation is terrible. If you read the api, even the variables are too generic to really figure out half the time.
Like for reals, the recommended method is to use product repository but if you do, you can't save images? wtf. really? in version 2.2?
If you save with the depreciated method, then it's impossible to get configurable products working? or not ? i don't know, there is like 10 ways to create configurable products posted online and none seem to work. lol. what a headache.
you can get all MAGENTO 2 Documentation and Architecture here