mirror of
https://github.com/open5gs/open5gs.git
synced 2026-05-04 14:20: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
|
|
@ -7,7 +7,7 @@
|
|||
OpenAPI_identity_data_t *OpenAPI_identity_data_create(
|
||||
OpenAPI_list_t *supi_list,
|
||||
OpenAPI_list_t *gpsi_list
|
||||
)
|
||||
)
|
||||
{
|
||||
OpenAPI_identity_data_t *identity_data_local_var = OpenAPI_malloc(sizeof(OpenAPI_identity_data_t));
|
||||
if (!identity_data_local_var) {
|
||||
|
|
@ -47,35 +47,35 @@ cJSON *OpenAPI_identity_data_convertToJSON(OpenAPI_identity_data_t *identity_dat
|
|||
|
||||
item = cJSON_CreateObject();
|
||||
if (identity_data->supi_list) {
|
||||
cJSON *supi_list = cJSON_AddArrayToObject(item, "supiList");
|
||||
if (supi_list == NULL) {
|
||||
ogs_error("OpenAPI_identity_data_convertToJSON() failed [supi_list]");
|
||||
goto end;
|
||||
}
|
||||
cJSON *supi_list = cJSON_AddArrayToObject(item, "supiList");
|
||||
if (supi_list == NULL) {
|
||||
ogs_error("OpenAPI_identity_data_convertToJSON() failed [supi_list]");
|
||||
goto end;
|
||||
}
|
||||
|
||||
OpenAPI_lnode_t *supi_list_node;
|
||||
OpenAPI_list_for_each(identity_data->supi_list, supi_list_node) {
|
||||
if (cJSON_AddStringToObject(supi_list, "", (char*)supi_list_node->data) == NULL) {
|
||||
ogs_error("OpenAPI_identity_data_convertToJSON() failed [supi_list]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
OpenAPI_lnode_t *supi_list_node;
|
||||
OpenAPI_list_for_each(identity_data->supi_list, supi_list_node) {
|
||||
if (cJSON_AddStringToObject(supi_list, "", (char*)supi_list_node->data) == NULL) {
|
||||
ogs_error("OpenAPI_identity_data_convertToJSON() failed [supi_list]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (identity_data->gpsi_list) {
|
||||
cJSON *gpsi_list = cJSON_AddArrayToObject(item, "gpsiList");
|
||||
if (gpsi_list == NULL) {
|
||||
ogs_error("OpenAPI_identity_data_convertToJSON() failed [gpsi_list]");
|
||||
goto end;
|
||||
}
|
||||
cJSON *gpsi_list = cJSON_AddArrayToObject(item, "gpsiList");
|
||||
if (gpsi_list == NULL) {
|
||||
ogs_error("OpenAPI_identity_data_convertToJSON() failed [gpsi_list]");
|
||||
goto end;
|
||||
}
|
||||
|
||||
OpenAPI_lnode_t *gpsi_list_node;
|
||||
OpenAPI_list_for_each(identity_data->gpsi_list, gpsi_list_node) {
|
||||
if (cJSON_AddStringToObject(gpsi_list, "", (char*)gpsi_list_node->data) == NULL) {
|
||||
ogs_error("OpenAPI_identity_data_convertToJSON() failed [gpsi_list]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
OpenAPI_lnode_t *gpsi_list_node;
|
||||
OpenAPI_list_for_each(identity_data->gpsi_list, gpsi_list_node) {
|
||||
if (cJSON_AddStringToObject(gpsi_list, "", (char*)gpsi_list_node->data) == NULL) {
|
||||
ogs_error("OpenAPI_identity_data_convertToJSON() failed [gpsi_list]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
end:
|
||||
|
|
@ -88,47 +88,47 @@ OpenAPI_identity_data_t *OpenAPI_identity_data_parseFromJSON(cJSON *identity_dat
|
|||
cJSON *supi_list = cJSON_GetObjectItemCaseSensitive(identity_dataJSON, "supiList");
|
||||
|
||||
OpenAPI_list_t *supi_listList;
|
||||
if (supi_list) {
|
||||
cJSON *supi_list_local;
|
||||
if (!cJSON_IsArray(supi_list)) {
|
||||
ogs_error("OpenAPI_identity_data_parseFromJSON() failed [supi_list]");
|
||||
goto end;
|
||||
}
|
||||
supi_listList = OpenAPI_list_create();
|
||||
|
||||
cJSON_ArrayForEach(supi_list_local, supi_list) {
|
||||
if (!cJSON_IsString(supi_list_local)) {
|
||||
ogs_error("OpenAPI_identity_data_parseFromJSON() failed [supi_list]");
|
||||
goto end;
|
||||
}
|
||||
OpenAPI_list_add(supi_listList, ogs_strdup_or_assert(supi_list_local->valuestring));
|
||||
}
|
||||
if (supi_list) {
|
||||
cJSON *supi_list_local;
|
||||
if (!cJSON_IsArray(supi_list)) {
|
||||
ogs_error("OpenAPI_identity_data_parseFromJSON() failed [supi_list]");
|
||||
goto end;
|
||||
}
|
||||
supi_listList = OpenAPI_list_create();
|
||||
|
||||
cJSON_ArrayForEach(supi_list_local, supi_list) {
|
||||
if (!cJSON_IsString(supi_list_local)) {
|
||||
ogs_error("OpenAPI_identity_data_parseFromJSON() failed [supi_list]");
|
||||
goto end;
|
||||
}
|
||||
OpenAPI_list_add(supi_listList , ogs_strdup_or_assert(supi_list_local->valuestring));
|
||||
}
|
||||
}
|
||||
|
||||
cJSON *gpsi_list = cJSON_GetObjectItemCaseSensitive(identity_dataJSON, "gpsiList");
|
||||
|
||||
OpenAPI_list_t *gpsi_listList;
|
||||
if (gpsi_list) {
|
||||
cJSON *gpsi_list_local;
|
||||
if (!cJSON_IsArray(gpsi_list)) {
|
||||
ogs_error("OpenAPI_identity_data_parseFromJSON() failed [gpsi_list]");
|
||||
goto end;
|
||||
}
|
||||
gpsi_listList = OpenAPI_list_create();
|
||||
|
||||
cJSON_ArrayForEach(gpsi_list_local, gpsi_list) {
|
||||
if (!cJSON_IsString(gpsi_list_local)) {
|
||||
ogs_error("OpenAPI_identity_data_parseFromJSON() failed [gpsi_list]");
|
||||
goto end;
|
||||
}
|
||||
OpenAPI_list_add(gpsi_listList, ogs_strdup_or_assert(gpsi_list_local->valuestring));
|
||||
}
|
||||
if (gpsi_list) {
|
||||
cJSON *gpsi_list_local;
|
||||
if (!cJSON_IsArray(gpsi_list)) {
|
||||
ogs_error("OpenAPI_identity_data_parseFromJSON() failed [gpsi_list]");
|
||||
goto end;
|
||||
}
|
||||
gpsi_listList = OpenAPI_list_create();
|
||||
|
||||
cJSON_ArrayForEach(gpsi_list_local, gpsi_list) {
|
||||
if (!cJSON_IsString(gpsi_list_local)) {
|
||||
ogs_error("OpenAPI_identity_data_parseFromJSON() failed [gpsi_list]");
|
||||
goto end;
|
||||
}
|
||||
OpenAPI_list_add(gpsi_listList , ogs_strdup_or_assert(gpsi_list_local->valuestring));
|
||||
}
|
||||
}
|
||||
|
||||
identity_data_local_var = OpenAPI_identity_data_create (
|
||||
supi_list ? supi_listList : NULL,
|
||||
gpsi_list ? gpsi_listList : NULL
|
||||
);
|
||||
);
|
||||
|
||||
return identity_data_local_var;
|
||||
end:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue