mirror of
https://github.com/open5gs/open5gs.git
synced 2026-05-02 21:30:10 +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_group_identifiers_t *OpenAPI_group_identifiers_create(
|
|||
char *ext_group_id,
|
||||
char *int_group_id,
|
||||
OpenAPI_list_t *ue_id_list
|
||||
)
|
||||
)
|
||||
{
|
||||
OpenAPI_group_identifiers_t *group_identifiers_local_var = OpenAPI_malloc(sizeof(OpenAPI_group_identifiers_t));
|
||||
if (!group_identifiers_local_var) {
|
||||
|
|
@ -47,38 +47,38 @@ cJSON *OpenAPI_group_identifiers_convertToJSON(OpenAPI_group_identifiers_t *grou
|
|||
|
||||
item = cJSON_CreateObject();
|
||||
if (group_identifiers->ext_group_id) {
|
||||
if (cJSON_AddStringToObject(item, "extGroupId", group_identifiers->ext_group_id) == NULL) {
|
||||
ogs_error("OpenAPI_group_identifiers_convertToJSON() failed [ext_group_id]");
|
||||
goto end;
|
||||
}
|
||||
if (cJSON_AddStringToObject(item, "extGroupId", group_identifiers->ext_group_id) == NULL) {
|
||||
ogs_error("OpenAPI_group_identifiers_convertToJSON() failed [ext_group_id]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
if (group_identifiers->int_group_id) {
|
||||
if (cJSON_AddStringToObject(item, "intGroupId", group_identifiers->int_group_id) == NULL) {
|
||||
ogs_error("OpenAPI_group_identifiers_convertToJSON() failed [int_group_id]");
|
||||
goto end;
|
||||
}
|
||||
if (cJSON_AddStringToObject(item, "intGroupId", group_identifiers->int_group_id) == NULL) {
|
||||
ogs_error("OpenAPI_group_identifiers_convertToJSON() failed [int_group_id]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
if (group_identifiers->ue_id_list) {
|
||||
cJSON *ue_id_listList = cJSON_AddArrayToObject(item, "ueIdList");
|
||||
if (ue_id_listList == NULL) {
|
||||
ogs_error("OpenAPI_group_identifiers_convertToJSON() failed [ue_id_list]");
|
||||
goto end;
|
||||
}
|
||||
cJSON *ue_id_listList = cJSON_AddArrayToObject(item, "ueIdList");
|
||||
if (ue_id_listList == NULL) {
|
||||
ogs_error("OpenAPI_group_identifiers_convertToJSON() failed [ue_id_list]");
|
||||
goto end;
|
||||
}
|
||||
|
||||
OpenAPI_lnode_t *ue_id_list_node;
|
||||
if (group_identifiers->ue_id_list) {
|
||||
OpenAPI_list_for_each(group_identifiers->ue_id_list, ue_id_list_node) {
|
||||
cJSON *itemLocal = OpenAPI_ue_id_convertToJSON(ue_id_list_node->data);
|
||||
if (itemLocal == NULL) {
|
||||
ogs_error("OpenAPI_group_identifiers_convertToJSON() failed [ue_id_list]");
|
||||
goto end;
|
||||
}
|
||||
cJSON_AddItemToArray(ue_id_listList, itemLocal);
|
||||
OpenAPI_lnode_t *ue_id_list_node;
|
||||
if (group_identifiers->ue_id_list) {
|
||||
OpenAPI_list_for_each(group_identifiers->ue_id_list, ue_id_list_node) {
|
||||
cJSON *itemLocal = OpenAPI_ue_id_convertToJSON(ue_id_list_node->data);
|
||||
if (itemLocal == NULL) {
|
||||
ogs_error("OpenAPI_group_identifiers_convertToJSON() failed [ue_id_list]");
|
||||
goto end;
|
||||
}
|
||||
cJSON_AddItemToArray(ue_id_listList, itemLocal);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
end:
|
||||
return item;
|
||||
|
|
@ -89,50 +89,50 @@ OpenAPI_group_identifiers_t *OpenAPI_group_identifiers_parseFromJSON(cJSON *grou
|
|||
OpenAPI_group_identifiers_t *group_identifiers_local_var = NULL;
|
||||
cJSON *ext_group_id = cJSON_GetObjectItemCaseSensitive(group_identifiersJSON, "extGroupId");
|
||||
|
||||
if (ext_group_id) {
|
||||
if (!cJSON_IsString(ext_group_id)) {
|
||||
ogs_error("OpenAPI_group_identifiers_parseFromJSON() failed [ext_group_id]");
|
||||
goto end;
|
||||
}
|
||||
if (ext_group_id) {
|
||||
if (!cJSON_IsString(ext_group_id)) {
|
||||
ogs_error("OpenAPI_group_identifiers_parseFromJSON() failed [ext_group_id]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
cJSON *int_group_id = cJSON_GetObjectItemCaseSensitive(group_identifiersJSON, "intGroupId");
|
||||
|
||||
if (int_group_id) {
|
||||
if (!cJSON_IsString(int_group_id)) {
|
||||
ogs_error("OpenAPI_group_identifiers_parseFromJSON() failed [int_group_id]");
|
||||
goto end;
|
||||
}
|
||||
if (int_group_id) {
|
||||
if (!cJSON_IsString(int_group_id)) {
|
||||
ogs_error("OpenAPI_group_identifiers_parseFromJSON() failed [int_group_id]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
cJSON *ue_id_list = cJSON_GetObjectItemCaseSensitive(group_identifiersJSON, "ueIdList");
|
||||
|
||||
OpenAPI_list_t *ue_id_listList;
|
||||
if (ue_id_list) {
|
||||
cJSON *ue_id_list_local_nonprimitive;
|
||||
if (!cJSON_IsArray(ue_id_list)) {
|
||||
if (ue_id_list) {
|
||||
cJSON *ue_id_list_local_nonprimitive;
|
||||
if (!cJSON_IsArray(ue_id_list)){
|
||||
ogs_error("OpenAPI_group_identifiers_parseFromJSON() failed [ue_id_list]");
|
||||
goto end;
|
||||
}
|
||||
|
||||
ue_id_listList = OpenAPI_list_create();
|
||||
|
||||
cJSON_ArrayForEach(ue_id_list_local_nonprimitive, ue_id_list ) {
|
||||
if (!cJSON_IsObject(ue_id_list_local_nonprimitive)) {
|
||||
ogs_error("OpenAPI_group_identifiers_parseFromJSON() failed [ue_id_list]");
|
||||
goto end;
|
||||
}
|
||||
OpenAPI_ue_id_t *ue_id_listItem = OpenAPI_ue_id_parseFromJSON(ue_id_list_local_nonprimitive);
|
||||
|
||||
ue_id_listList = OpenAPI_list_create();
|
||||
|
||||
cJSON_ArrayForEach(ue_id_list_local_nonprimitive, ue_id_list ) {
|
||||
if (!cJSON_IsObject(ue_id_list_local_nonprimitive)) {
|
||||
ogs_error("OpenAPI_group_identifiers_parseFromJSON() failed [ue_id_list]");
|
||||
goto end;
|
||||
}
|
||||
OpenAPI_ue_id_t *ue_id_listItem = OpenAPI_ue_id_parseFromJSON(ue_id_list_local_nonprimitive);
|
||||
|
||||
OpenAPI_list_add(ue_id_listList, ue_id_listItem);
|
||||
}
|
||||
OpenAPI_list_add(ue_id_listList, ue_id_listItem);
|
||||
}
|
||||
}
|
||||
|
||||
group_identifiers_local_var = OpenAPI_group_identifiers_create (
|
||||
ext_group_id ? ogs_strdup_or_assert(ext_group_id->valuestring) : NULL,
|
||||
int_group_id ? ogs_strdup_or_assert(int_group_id->valuestring) : NULL,
|
||||
ue_id_list ? ue_id_listList : NULL
|
||||
);
|
||||
);
|
||||
|
||||
return group_identifiers_local_var;
|
||||
end:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue