DataDog / dd-sdk-kotlin-multiplatform

Datadog SDK for Kotlin Multiplatform
Apache License 2.0
4 stars 0 forks source link

RUM-5996: Generate mapping functions for mapping native models to common models #66

Closed 0xnm closed 1 month ago

0xnm commented 1 month ago

What does this PR do?

This PR brings a generation of mapping functions for mapping native models to common models.

This is done by using Kotlin Poet to generate the necessary code.

There are some differences in the way models are generated/named on iOS and Android, so I had to apply some code paths to address that.

Some items are removed from JSON definitions to align with common set of definitions for both platforms.

This PR is split into 2 commits: first commit brings the logic to generate the code, second one brings tests.

Review checklist (to be filled by reviewers)