mirror of
https://github.com/open5gs/open5gs.git
synced 2026-05-04 22:30:09 +00:00
[SBI] Fixed openapitools MAP generation (#2103)
MAP was generated incorrectly because {{#items}}..{{#items}} was
missing.
Because of this, If scpInfo has scpPort, NRF crashes.
This commit is contained in:
parent
1d8324af9f
commit
ce668c556c
437 changed files with 111103 additions and 906 deletions
|
|
@ -103,10 +103,10 @@ cJSON *OpenAPI_ue_policy_set_convertToJSON(OpenAPI_ue_policy_set_t *ue_policy_se
|
|||
OpenAPI_presence_info_convertToJSON(localKeyValue->value) :
|
||||
cJSON_CreateNull();
|
||||
if (itemLocal == NULL) {
|
||||
ogs_error("OpenAPI_ue_policy_set_convertToJSON() failed [pra_infos]");
|
||||
ogs_error("OpenAPI_ue_policy_set_convertToJSON() failed [inner]");
|
||||
goto end;
|
||||
}
|
||||
cJSON_AddItemToObject(pra_infos, localKeyValue->key, itemLocal);
|
||||
cJSON_AddItemToObject(localMapObject, localKeyValue->key, itemLocal);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -142,10 +142,10 @@ cJSON *OpenAPI_ue_policy_set_convertToJSON(OpenAPI_ue_policy_set_t *ue_policy_se
|
|||
OpenAPI_ue_policy_section_convertToJSON(localKeyValue->value) :
|
||||
cJSON_CreateNull();
|
||||
if (itemLocal == NULL) {
|
||||
ogs_error("OpenAPI_ue_policy_set_convertToJSON() failed [ue_policy_sections]");
|
||||
ogs_error("OpenAPI_ue_policy_set_convertToJSON() failed [inner]");
|
||||
goto end;
|
||||
}
|
||||
cJSON_AddItemToObject(ue_policy_sections, localKeyValue->key, itemLocal);
|
||||
cJSON_AddItemToObject(localMapObject, localKeyValue->key, itemLocal);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -181,10 +181,10 @@ cJSON *OpenAPI_ue_policy_set_convertToJSON(OpenAPI_ue_policy_set_t *ue_policy_se
|
|||
OpenAPI_plmn_route_selection_descriptor_convertToJSON(localKeyValue->value) :
|
||||
cJSON_CreateNull();
|
||||
if (itemLocal == NULL) {
|
||||
ogs_error("OpenAPI_ue_policy_set_convertToJSON() failed [allowed_route_sel_descs]");
|
||||
ogs_error("OpenAPI_ue_policy_set_convertToJSON() failed [inner]");
|
||||
goto end;
|
||||
}
|
||||
cJSON_AddItemToObject(allowed_route_sel_descs, localKeyValue->key, itemLocal);
|
||||
cJSON_AddItemToObject(localMapObject, localKeyValue->key, itemLocal);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -246,16 +246,16 @@ OpenAPI_ue_policy_set_t *OpenAPI_ue_policy_set_parseFromJSON(cJSON *ue_policy_se
|
|||
OpenAPI_map_t *localMapKeyPair = NULL;
|
||||
cJSON_ArrayForEach(pra_infos_local_map, pra_infos) {
|
||||
cJSON *localMapObject = pra_infos_local_map;
|
||||
if (cJSON_IsObject(pra_infos_local_map)) {
|
||||
if (cJSON_IsObject(localMapObject)) {
|
||||
localMapKeyPair = OpenAPI_map_create(
|
||||
ogs_strdup(localMapObject->string), OpenAPI_presence_info_parseFromJSON(localMapObject));
|
||||
} else if (cJSON_IsNull(pra_infos_local_map)) {
|
||||
} else if (cJSON_IsNull(localMapObject)) {
|
||||
localMapKeyPair = OpenAPI_map_create(ogs_strdup(localMapObject->string), NULL);
|
||||
} else {
|
||||
ogs_error("OpenAPI_ue_policy_set_parseFromJSON() failed [pra_infos]");
|
||||
ogs_error("OpenAPI_ue_policy_set_parseFromJSON() failed [inner]");
|
||||
goto end;
|
||||
}
|
||||
OpenAPI_list_add(pra_infosList , localMapKeyPair);
|
||||
OpenAPI_list_add(pra_infosList, localMapKeyPair);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -275,7 +275,7 @@ OpenAPI_ue_policy_set_t *OpenAPI_ue_policy_set_parseFromJSON(cJSON *ue_policy_se
|
|||
ogs_error("OpenAPI_ue_policy_set_parseFromJSON() failed [subsc_cats]");
|
||||
goto end;
|
||||
}
|
||||
OpenAPI_list_add(subsc_catsList , ogs_strdup(subsc_cats_local->valuestring));
|
||||
OpenAPI_list_add(subsc_catsList, ogs_strdup(subsc_cats_local->valuestring));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -292,16 +292,16 @@ OpenAPI_ue_policy_set_t *OpenAPI_ue_policy_set_parseFromJSON(cJSON *ue_policy_se
|
|||
OpenAPI_map_t *localMapKeyPair = NULL;
|
||||
cJSON_ArrayForEach(ue_policy_sections_local_map, ue_policy_sections) {
|
||||
cJSON *localMapObject = ue_policy_sections_local_map;
|
||||
if (cJSON_IsObject(ue_policy_sections_local_map)) {
|
||||
if (cJSON_IsObject(localMapObject)) {
|
||||
localMapKeyPair = OpenAPI_map_create(
|
||||
ogs_strdup(localMapObject->string), OpenAPI_ue_policy_section_parseFromJSON(localMapObject));
|
||||
} else if (cJSON_IsNull(ue_policy_sections_local_map)) {
|
||||
} else if (cJSON_IsNull(localMapObject)) {
|
||||
localMapKeyPair = OpenAPI_map_create(ogs_strdup(localMapObject->string), NULL);
|
||||
} else {
|
||||
ogs_error("OpenAPI_ue_policy_set_parseFromJSON() failed [ue_policy_sections]");
|
||||
ogs_error("OpenAPI_ue_policy_set_parseFromJSON() failed [inner]");
|
||||
goto end;
|
||||
}
|
||||
OpenAPI_list_add(ue_policy_sectionsList , localMapKeyPair);
|
||||
OpenAPI_list_add(ue_policy_sectionsList, localMapKeyPair);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -321,7 +321,7 @@ OpenAPI_ue_policy_set_t *OpenAPI_ue_policy_set_parseFromJSON(cJSON *ue_policy_se
|
|||
ogs_error("OpenAPI_ue_policy_set_parseFromJSON() failed [upsis]");
|
||||
goto end;
|
||||
}
|
||||
OpenAPI_list_add(upsisList , ogs_strdup(upsis_local->valuestring));
|
||||
OpenAPI_list_add(upsisList, ogs_strdup(upsis_local->valuestring));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -338,16 +338,16 @@ OpenAPI_ue_policy_set_t *OpenAPI_ue_policy_set_parseFromJSON(cJSON *ue_policy_se
|
|||
OpenAPI_map_t *localMapKeyPair = NULL;
|
||||
cJSON_ArrayForEach(allowed_route_sel_descs_local_map, allowed_route_sel_descs) {
|
||||
cJSON *localMapObject = allowed_route_sel_descs_local_map;
|
||||
if (cJSON_IsObject(allowed_route_sel_descs_local_map)) {
|
||||
if (cJSON_IsObject(localMapObject)) {
|
||||
localMapKeyPair = OpenAPI_map_create(
|
||||
ogs_strdup(localMapObject->string), OpenAPI_plmn_route_selection_descriptor_parseFromJSON(localMapObject));
|
||||
} else if (cJSON_IsNull(allowed_route_sel_descs_local_map)) {
|
||||
} else if (cJSON_IsNull(localMapObject)) {
|
||||
localMapKeyPair = OpenAPI_map_create(ogs_strdup(localMapObject->string), NULL);
|
||||
} else {
|
||||
ogs_error("OpenAPI_ue_policy_set_parseFromJSON() failed [allowed_route_sel_descs]");
|
||||
ogs_error("OpenAPI_ue_policy_set_parseFromJSON() failed [inner]");
|
||||
goto end;
|
||||
}
|
||||
OpenAPI_list_add(allowed_route_sel_descsList , localMapKeyPair);
|
||||
OpenAPI_list_add(allowed_route_sel_descsList, localMapKeyPair);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -385,7 +385,7 @@ OpenAPI_ue_policy_set_t *OpenAPI_ue_policy_set_parseFromJSON(cJSON *ue_policy_se
|
|||
ogs_error("OpenAPI_ue_policy_set_parseFromJSON() failed [os_ids]");
|
||||
goto end;
|
||||
}
|
||||
OpenAPI_list_add(os_idsList , ogs_strdup(os_ids_local->valuestring));
|
||||
OpenAPI_list_add(os_idsList, ogs_strdup(os_ids_local->valuestring));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue