Fixes #4601: Refactor whole API generation
Merge pull request #470 from VinceMacBuche/arch_4600/imp_4601/refactor_api_building

Fixes #4601: Refactor whole API generation