Api_version dsl code refactoring