5G-MAG / rt-common-shared

Tools common to various projects
Other
3 stars 7 forks source link

5gms generate openapi enhancements #10

Closed davidjwbbc closed 2 years ago

davidjwbbc commented 2 years ago

Support for 5G-MAG/rt-5gms-application-function#2.

Change -a option to allow bindings for multiple APIs to be generated at once.

Add -y option to take an executable path of a process to run after cloning the 5G_APIs repository, but before generating the bindings.

The addition of -y allows the rt-5gms-application-function to provide a script which will "fix" the YAML so that openapi-generator v5.2.0 can generate useful bindings. Version 5.2.0 of openapi-generator (the version used by open5gs) cannot handle an anyOf being used to allow future expansion of an enum by having two string type schemas in the anyOf, one to hanbdle the enum and another to handle any other string in the field.

rjb1000 commented 2 years ago

(Slightly off topic question.) Out of interest, why has v6.0.1 been chosen as the default version of OpenAPI Generator in the generate_openapi script when Open5GS relies on v5.2 of the tool?

default_openapi_gen_version='6.0.1'