Skip to content

Move common models (3GPP TS 29.571 to common-src)

Stefan Spettel requested to merge common_models into develop

Changes

  • Re-generated all models from 3gPP 29.571 and put them into common-src
  • To avoid compiling all files (not all files are used by all NFs/APIs), we can add the files to the cmake list USED_COMMON_MODEL_SRC_FILES

OpenAPI generator version

I used the following command to generate the models:

docker run --rm -v ${PWD}:/local openapitools/openapi-generator-cli:v6.0.1 generate -c /local/config.json -i /local/TS29571_CommonData.yaml -g cpp-pistache-server -o /local/out

config.json looks as follows:

{
  "apiPackage" : "oai.api",
  "modelPackage": "oai.model.common",
  "helpersPackage": "oai.model.common.helpers"
}

That works fine, but sometimes it creates the following: oai::model::common::std::string 😞

Apart from that, it generates most files correctly, but it has an issue with the anyOf relations that should be an inheritance (e.g. all the nullable "Rm" values, see AccessTypeRm.

There it makes sense to fix it manually.

Issues

Some of the auto-generated files still have syntax errors, but as they are not imported/used by any NF for now, we can leave it and fix it when we need it

Note to reviewer

@kharade @tien-thinh.nguyen I did not really change anything here, this is just copy-past work, so you do not really have to look through the files for the review

Implements #2 (closed)

Edited by Stefan Spettel

Merge request reports