mirror of
https://github.com/open5gs/open5gs.git
synced 2026-05-04 06:10:11 +00:00
Upgrade SBI(Service-based Interface)
* OpenAPI Generator version: 4.3.1 ==> 5.5.1 * Specification : r16.8.0 (20210629)
This commit is contained in:
parent
2aaa8200c2
commit
f278d58a69
1914 changed files with 91329 additions and 57361 deletions
|
|
@ -8,7 +8,7 @@ OpenAPI_smf_selection_subscription_data_t *OpenAPI_smf_selection_subscription_da
|
|||
char *supported_features,
|
||||
OpenAPI_list_t* subscribed_snssai_infos,
|
||||
char *shared_snssai_infos_id
|
||||
)
|
||||
)
|
||||
{
|
||||
OpenAPI_smf_selection_subscription_data_t *smf_selection_subscription_data_local_var = OpenAPI_malloc(sizeof(OpenAPI_smf_selection_subscription_data_t));
|
||||
if (!smf_selection_subscription_data_local_var) {
|
||||
|
|
@ -49,38 +49,38 @@ cJSON *OpenAPI_smf_selection_subscription_data_convertToJSON(OpenAPI_smf_selecti
|
|||
|
||||
item = cJSON_CreateObject();
|
||||
if (smf_selection_subscription_data->supported_features) {
|
||||
if (cJSON_AddStringToObject(item, "supportedFeatures", smf_selection_subscription_data->supported_features) == NULL) {
|
||||
ogs_error("OpenAPI_smf_selection_subscription_data_convertToJSON() failed [supported_features]");
|
||||
goto end;
|
||||
}
|
||||
if (cJSON_AddStringToObject(item, "supportedFeatures", smf_selection_subscription_data->supported_features) == NULL) {
|
||||
ogs_error("OpenAPI_smf_selection_subscription_data_convertToJSON() failed [supported_features]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
if (smf_selection_subscription_data->subscribed_snssai_infos) {
|
||||
cJSON *subscribed_snssai_infos = cJSON_AddObjectToObject(item, "subscribedSnssaiInfos");
|
||||
if (subscribed_snssai_infos == NULL) {
|
||||
cJSON *subscribed_snssai_infos = cJSON_AddObjectToObject(item, "subscribedSnssaiInfos");
|
||||
if (subscribed_snssai_infos == NULL) {
|
||||
ogs_error("OpenAPI_smf_selection_subscription_data_convertToJSON() failed [subscribed_snssai_infos]");
|
||||
goto end;
|
||||
}
|
||||
cJSON *localMapObject = subscribed_snssai_infos;
|
||||
OpenAPI_lnode_t *subscribed_snssai_infos_node;
|
||||
if (smf_selection_subscription_data->subscribed_snssai_infos) {
|
||||
OpenAPI_list_for_each(smf_selection_subscription_data->subscribed_snssai_infos, subscribed_snssai_infos_node) {
|
||||
OpenAPI_map_t *localKeyValue = (OpenAPI_map_t*)subscribed_snssai_infos_node->data;
|
||||
cJSON *itemLocal = OpenAPI_snssai_info_convertToJSON(localKeyValue->value);
|
||||
if (itemLocal == NULL) {
|
||||
ogs_error("OpenAPI_smf_selection_subscription_data_convertToJSON() failed [subscribed_snssai_infos]");
|
||||
goto end;
|
||||
}
|
||||
cJSON *localMapObject = subscribed_snssai_infos;
|
||||
OpenAPI_lnode_t *subscribed_snssai_infos_node;
|
||||
if (smf_selection_subscription_data->subscribed_snssai_infos) {
|
||||
OpenAPI_list_for_each(smf_selection_subscription_data->subscribed_snssai_infos, subscribed_snssai_infos_node) {
|
||||
OpenAPI_map_t *localKeyValue = (OpenAPI_map_t*)subscribed_snssai_infos_node->data;
|
||||
cJSON *itemLocal = OpenAPI_snssai_info_convertToJSON(localKeyValue->value);
|
||||
if (itemLocal == NULL) {
|
||||
ogs_error("OpenAPI_smf_selection_subscription_data_convertToJSON() failed [subscribed_snssai_infos]");
|
||||
goto end;
|
||||
}
|
||||
cJSON_AddItemToObject(subscribed_snssai_infos, localKeyValue->key, itemLocal);
|
||||
cJSON_AddItemToObject(subscribed_snssai_infos, localKeyValue->key, itemLocal);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (smf_selection_subscription_data->shared_snssai_infos_id) {
|
||||
if (cJSON_AddStringToObject(item, "sharedSnssaiInfosId", smf_selection_subscription_data->shared_snssai_infos_id) == NULL) {
|
||||
ogs_error("OpenAPI_smf_selection_subscription_data_convertToJSON() failed [shared_snssai_infos_id]");
|
||||
goto end;
|
||||
}
|
||||
if (cJSON_AddStringToObject(item, "sharedSnssaiInfosId", smf_selection_subscription_data->shared_snssai_infos_id) == NULL) {
|
||||
ogs_error("OpenAPI_smf_selection_subscription_data_convertToJSON() failed [shared_snssai_infos_id]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
end:
|
||||
|
|
@ -92,50 +92,50 @@ OpenAPI_smf_selection_subscription_data_t *OpenAPI_smf_selection_subscription_da
|
|||
OpenAPI_smf_selection_subscription_data_t *smf_selection_subscription_data_local_var = NULL;
|
||||
cJSON *supported_features = cJSON_GetObjectItemCaseSensitive(smf_selection_subscription_dataJSON, "supportedFeatures");
|
||||
|
||||
if (supported_features) {
|
||||
if (!cJSON_IsString(supported_features)) {
|
||||
ogs_error("OpenAPI_smf_selection_subscription_data_parseFromJSON() failed [supported_features]");
|
||||
goto end;
|
||||
}
|
||||
if (supported_features) {
|
||||
if (!cJSON_IsString(supported_features)) {
|
||||
ogs_error("OpenAPI_smf_selection_subscription_data_parseFromJSON() failed [supported_features]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
cJSON *subscribed_snssai_infos = cJSON_GetObjectItemCaseSensitive(smf_selection_subscription_dataJSON, "subscribedSnssaiInfos");
|
||||
|
||||
OpenAPI_list_t *subscribed_snssai_infosList;
|
||||
if (subscribed_snssai_infos) {
|
||||
cJSON *subscribed_snssai_infos_local_map;
|
||||
if (!cJSON_IsObject(subscribed_snssai_infos)) {
|
||||
if (subscribed_snssai_infos) {
|
||||
cJSON *subscribed_snssai_infos_local_map;
|
||||
if (!cJSON_IsObject(subscribed_snssai_infos)) {
|
||||
ogs_error("OpenAPI_smf_selection_subscription_data_parseFromJSON() failed [subscribed_snssai_infos]");
|
||||
goto end;
|
||||
}
|
||||
subscribed_snssai_infosList = OpenAPI_list_create();
|
||||
OpenAPI_map_t *localMapKeyPair = NULL;
|
||||
cJSON_ArrayForEach(subscribed_snssai_infos_local_map, subscribed_snssai_infos) {
|
||||
cJSON *localMapObject = subscribed_snssai_infos_local_map;
|
||||
if (!cJSON_IsObject(subscribed_snssai_infos_local_map)) {
|
||||
ogs_error("OpenAPI_smf_selection_subscription_data_parseFromJSON() failed [subscribed_snssai_infos]");
|
||||
goto end;
|
||||
}
|
||||
subscribed_snssai_infosList = OpenAPI_list_create();
|
||||
OpenAPI_map_t *localMapKeyPair = NULL;
|
||||
cJSON_ArrayForEach(subscribed_snssai_infos_local_map, subscribed_snssai_infos) {
|
||||
cJSON *localMapObject = subscribed_snssai_infos_local_map;
|
||||
if (!cJSON_IsObject(subscribed_snssai_infos_local_map)) {
|
||||
ogs_error("OpenAPI_smf_selection_subscription_data_parseFromJSON() failed [subscribed_snssai_infos]");
|
||||
goto end;
|
||||
}
|
||||
localMapKeyPair = OpenAPI_map_create(
|
||||
localMapObject->string, OpenAPI_snssai_info_parseFromJSON(localMapObject));
|
||||
OpenAPI_list_add(subscribed_snssai_infosList, localMapKeyPair);
|
||||
}
|
||||
localMapKeyPair = OpenAPI_map_create(
|
||||
localMapObject->string, OpenAPI_snssai_info_parseFromJSON(localMapObject));
|
||||
OpenAPI_list_add(subscribed_snssai_infosList , localMapKeyPair);
|
||||
}
|
||||
}
|
||||
|
||||
cJSON *shared_snssai_infos_id = cJSON_GetObjectItemCaseSensitive(smf_selection_subscription_dataJSON, "sharedSnssaiInfosId");
|
||||
|
||||
if (shared_snssai_infos_id) {
|
||||
if (!cJSON_IsString(shared_snssai_infos_id)) {
|
||||
ogs_error("OpenAPI_smf_selection_subscription_data_parseFromJSON() failed [shared_snssai_infos_id]");
|
||||
goto end;
|
||||
}
|
||||
if (shared_snssai_infos_id) {
|
||||
if (!cJSON_IsString(shared_snssai_infos_id)) {
|
||||
ogs_error("OpenAPI_smf_selection_subscription_data_parseFromJSON() failed [shared_snssai_infos_id]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
smf_selection_subscription_data_local_var = OpenAPI_smf_selection_subscription_data_create (
|
||||
supported_features ? ogs_strdup_or_assert(supported_features->valuestring) : NULL,
|
||||
subscribed_snssai_infos ? subscribed_snssai_infosList : NULL,
|
||||
shared_snssai_infos_id ? ogs_strdup_or_assert(shared_snssai_infos_id->valuestring) : NULL
|
||||
);
|
||||
);
|
||||
|
||||
return smf_selection_subscription_data_local_var;
|
||||
end:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue