mirror of
https://github.com/open5gs/open5gs.git
synced 2026-05-04 22:30:09 +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
|
|
@ -9,7 +9,7 @@ OpenAPI_wireline_area_t *OpenAPI_wireline_area_create(
|
|||
OpenAPI_list_t *hfc_n_ids,
|
||||
char *area_code_b,
|
||||
char *area_code_c
|
||||
)
|
||||
)
|
||||
{
|
||||
OpenAPI_wireline_area_t *wireline_area_local_var = OpenAPI_malloc(sizeof(OpenAPI_wireline_area_t));
|
||||
if (!wireline_area_local_var) {
|
||||
|
|
@ -53,45 +53,49 @@ cJSON *OpenAPI_wireline_area_convertToJSON(OpenAPI_wireline_area_t *wireline_are
|
|||
|
||||
item = cJSON_CreateObject();
|
||||
if (wireline_area->global_line_ids) {
|
||||
cJSON *global_line_ids = cJSON_AddArrayToObject(item, "globalLineIds");
|
||||
if (global_line_ids == NULL) {
|
||||
ogs_error("OpenAPI_wireline_area_convertToJSON() failed [global_line_ids]");
|
||||
goto end;
|
||||
}
|
||||
cJSON *global_line_ids = cJSON_AddArrayToObject(item, "globalLineIds");
|
||||
if (global_line_ids == NULL) {
|
||||
ogs_error("OpenAPI_wireline_area_convertToJSON() failed [global_line_ids]");
|
||||
goto end;
|
||||
}
|
||||
|
||||
OpenAPI_lnode_t *global_line_ids_node;
|
||||
OpenAPI_list_for_each(wireline_area->global_line_ids, global_line_ids_node) {
|
||||
}
|
||||
OpenAPI_lnode_t *global_line_ids_node;
|
||||
OpenAPI_list_for_each(wireline_area->global_line_ids, global_line_ids_node) {
|
||||
if (cJSON_AddStringToObject(global_line_ids, "", (char*)global_line_ids_node->data) == NULL) {
|
||||
ogs_error("OpenAPI_wireline_area_convertToJSON() failed [global_line_ids]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (wireline_area->hfc_n_ids) {
|
||||
cJSON *hfc_n_ids = cJSON_AddArrayToObject(item, "hfcNIds");
|
||||
if (hfc_n_ids == NULL) {
|
||||
ogs_error("OpenAPI_wireline_area_convertToJSON() failed [hfc_n_ids]");
|
||||
goto end;
|
||||
}
|
||||
cJSON *hfc_n_ids = cJSON_AddArrayToObject(item, "hfcNIds");
|
||||
if (hfc_n_ids == NULL) {
|
||||
ogs_error("OpenAPI_wireline_area_convertToJSON() failed [hfc_n_ids]");
|
||||
goto end;
|
||||
}
|
||||
|
||||
OpenAPI_lnode_t *hfc_n_ids_node;
|
||||
OpenAPI_list_for_each(wireline_area->hfc_n_ids, hfc_n_ids_node) {
|
||||
if (cJSON_AddStringToObject(hfc_n_ids, "", (char*)hfc_n_ids_node->data) == NULL) {
|
||||
ogs_error("OpenAPI_wireline_area_convertToJSON() failed [hfc_n_ids]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
OpenAPI_lnode_t *hfc_n_ids_node;
|
||||
OpenAPI_list_for_each(wireline_area->hfc_n_ids, hfc_n_ids_node) {
|
||||
if (cJSON_AddStringToObject(hfc_n_ids, "", (char*)hfc_n_ids_node->data) == NULL) {
|
||||
ogs_error("OpenAPI_wireline_area_convertToJSON() failed [hfc_n_ids]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (wireline_area->area_code_b) {
|
||||
if (cJSON_AddStringToObject(item, "areaCodeB", wireline_area->area_code_b) == NULL) {
|
||||
ogs_error("OpenAPI_wireline_area_convertToJSON() failed [area_code_b]");
|
||||
goto end;
|
||||
}
|
||||
if (cJSON_AddStringToObject(item, "areaCodeB", wireline_area->area_code_b) == NULL) {
|
||||
ogs_error("OpenAPI_wireline_area_convertToJSON() failed [area_code_b]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
if (wireline_area->area_code_c) {
|
||||
if (cJSON_AddStringToObject(item, "areaCodeC", wireline_area->area_code_c) == NULL) {
|
||||
ogs_error("OpenAPI_wireline_area_convertToJSON() failed [area_code_c]");
|
||||
goto end;
|
||||
}
|
||||
if (cJSON_AddStringToObject(item, "areaCodeC", wireline_area->area_code_c) == NULL) {
|
||||
ogs_error("OpenAPI_wireline_area_convertToJSON() failed [area_code_c]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
end:
|
||||
|
|
@ -104,62 +108,67 @@ OpenAPI_wireline_area_t *OpenAPI_wireline_area_parseFromJSON(cJSON *wireline_are
|
|||
cJSON *global_line_ids = cJSON_GetObjectItemCaseSensitive(wireline_areaJSON, "globalLineIds");
|
||||
|
||||
OpenAPI_list_t *global_line_idsList;
|
||||
if (global_line_ids) {
|
||||
cJSON *global_line_ids_local;
|
||||
if (!cJSON_IsArray(global_line_ids)) {
|
||||
ogs_error("OpenAPI_wireline_area_parseFromJSON() failed [global_line_ids]");
|
||||
goto end;
|
||||
}
|
||||
global_line_idsList = OpenAPI_list_create();
|
||||
|
||||
cJSON_ArrayForEach(global_line_ids_local, global_line_ids) {
|
||||
}
|
||||
if (global_line_ids) {
|
||||
cJSON *global_line_ids_local;
|
||||
if (!cJSON_IsArray(global_line_ids)) {
|
||||
ogs_error("OpenAPI_wireline_area_parseFromJSON() failed [global_line_ids]");
|
||||
goto end;
|
||||
}
|
||||
global_line_idsList = OpenAPI_list_create();
|
||||
|
||||
cJSON_ArrayForEach(global_line_ids_local, global_line_ids) {
|
||||
if (!cJSON_IsString(global_line_ids_local)) {
|
||||
ogs_error("OpenAPI_wireline_area_parseFromJSON() failed [global_line_ids]");
|
||||
goto end;
|
||||
}
|
||||
OpenAPI_list_add(global_line_idsList , ogs_strdup_or_assert(global_line_ids_local->valuestring));
|
||||
}
|
||||
}
|
||||
|
||||
cJSON *hfc_n_ids = cJSON_GetObjectItemCaseSensitive(wireline_areaJSON, "hfcNIds");
|
||||
|
||||
OpenAPI_list_t *hfc_n_idsList;
|
||||
if (hfc_n_ids) {
|
||||
cJSON *hfc_n_ids_local;
|
||||
if (!cJSON_IsArray(hfc_n_ids)) {
|
||||
ogs_error("OpenAPI_wireline_area_parseFromJSON() failed [hfc_n_ids]");
|
||||
goto end;
|
||||
}
|
||||
hfc_n_idsList = OpenAPI_list_create();
|
||||
|
||||
cJSON_ArrayForEach(hfc_n_ids_local, hfc_n_ids) {
|
||||
if (!cJSON_IsString(hfc_n_ids_local)) {
|
||||
ogs_error("OpenAPI_wireline_area_parseFromJSON() failed [hfc_n_ids]");
|
||||
goto end;
|
||||
}
|
||||
OpenAPI_list_add(hfc_n_idsList, ogs_strdup_or_assert(hfc_n_ids_local->valuestring));
|
||||
}
|
||||
if (hfc_n_ids) {
|
||||
cJSON *hfc_n_ids_local;
|
||||
if (!cJSON_IsArray(hfc_n_ids)) {
|
||||
ogs_error("OpenAPI_wireline_area_parseFromJSON() failed [hfc_n_ids]");
|
||||
goto end;
|
||||
}
|
||||
hfc_n_idsList = OpenAPI_list_create();
|
||||
|
||||
cJSON_ArrayForEach(hfc_n_ids_local, hfc_n_ids) {
|
||||
if (!cJSON_IsString(hfc_n_ids_local)) {
|
||||
ogs_error("OpenAPI_wireline_area_parseFromJSON() failed [hfc_n_ids]");
|
||||
goto end;
|
||||
}
|
||||
OpenAPI_list_add(hfc_n_idsList , ogs_strdup_or_assert(hfc_n_ids_local->valuestring));
|
||||
}
|
||||
}
|
||||
|
||||
cJSON *area_code_b = cJSON_GetObjectItemCaseSensitive(wireline_areaJSON, "areaCodeB");
|
||||
|
||||
if (area_code_b) {
|
||||
if (!cJSON_IsString(area_code_b)) {
|
||||
ogs_error("OpenAPI_wireline_area_parseFromJSON() failed [area_code_b]");
|
||||
goto end;
|
||||
}
|
||||
if (area_code_b) {
|
||||
if (!cJSON_IsString(area_code_b)) {
|
||||
ogs_error("OpenAPI_wireline_area_parseFromJSON() failed [area_code_b]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
cJSON *area_code_c = cJSON_GetObjectItemCaseSensitive(wireline_areaJSON, "areaCodeC");
|
||||
|
||||
if (area_code_c) {
|
||||
if (!cJSON_IsString(area_code_c)) {
|
||||
ogs_error("OpenAPI_wireline_area_parseFromJSON() failed [area_code_c]");
|
||||
goto end;
|
||||
}
|
||||
if (area_code_c) {
|
||||
if (!cJSON_IsString(area_code_c)) {
|
||||
ogs_error("OpenAPI_wireline_area_parseFromJSON() failed [area_code_c]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
wireline_area_local_var = OpenAPI_wireline_area_create (
|
||||
global_line_ids ? global_line_idsList : NULL,
|
||||
hfc_n_ids ? hfc_n_idsList : NULL,
|
||||
area_code_b ? ogs_strdup_or_assert(area_code_b->valuestring) : NULL,
|
||||
area_code_c ? ogs_strdup_or_assert(area_code_c->valuestring) : NULL
|
||||
);
|
||||
);
|
||||
|
||||
return wireline_area_local_var;
|
||||
end:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue