5G-MAG / rt-5gms-media-stream-handler

5G Media Streaming - Media Stream Handler
https://www.5g-mag.com/streaming
Other
5 stars 4 forks source link

Generate model classes from .yaml files #10

Open dsilhavy opened 1 year ago

dsilhavy commented 1 year ago

Feature description TS26.512 contains OpenAPI .yaml file definitions. Check if we can use them to automatically generate model classes such as https://github.com/5G-MAG/rt-5gms-media-stream-handler/blob/development/app/src/main/java/com/example/a5gms_mediastreamhandler/network/ServiceAccessInformation.kt

rjb1000 commented 1 year ago

TS 26.512 provides OpenAPI YAML files for M1 and M5 only (i.e. there is no formal IDL for the M6 and M7 client APIs yet). But you should be able to autogenerate code based on the definition of ServiceAccesInformationResource in _M5ServiceAccessInformation.yaml, for example.

Recommend you take a look at the OpenAPI Generator tool. We have successfully used this to autogenerate C code for the 5GMS AF and Python code for the 5GMS AS. I see it also claims to produce Kotlin code.

rjb1000 commented 1 year ago

Out of interest, why would the Media Stream Handler want to inspect the Service Access Information?

(This data structure should never leak outside the Media Session Handler in the 5GMS Client.)