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
|
|
@ -10,7 +10,7 @@ OpenAPI_notification_data_t *OpenAPI_notification_data_create(
|
|||
OpenAPI_nf_profile_t *nf_profile,
|
||||
OpenAPI_list_t *profile_changes,
|
||||
OpenAPI_condition_event_type_e condition_event
|
||||
)
|
||||
)
|
||||
{
|
||||
OpenAPI_notification_data_t *notification_data_local_var = OpenAPI_malloc(sizeof(OpenAPI_notification_data_t));
|
||||
if (!notification_data_local_var) {
|
||||
|
|
@ -61,43 +61,43 @@ cJSON *OpenAPI_notification_data_convertToJSON(OpenAPI_notification_data_t *noti
|
|||
}
|
||||
|
||||
if (notification_data->nf_profile) {
|
||||
cJSON *nf_profile_local_JSON = OpenAPI_nf_profile_convertToJSON(notification_data->nf_profile);
|
||||
if (nf_profile_local_JSON == NULL) {
|
||||
ogs_error("OpenAPI_notification_data_convertToJSON() failed [nf_profile]");
|
||||
goto end;
|
||||
}
|
||||
cJSON_AddItemToObject(item, "nfProfile", nf_profile_local_JSON);
|
||||
if (item->child == NULL) {
|
||||
ogs_error("OpenAPI_notification_data_convertToJSON() failed [nf_profile]");
|
||||
goto end;
|
||||
}
|
||||
cJSON *nf_profile_local_JSON = OpenAPI_nf_profile_convertToJSON(notification_data->nf_profile);
|
||||
if (nf_profile_local_JSON == NULL) {
|
||||
ogs_error("OpenAPI_notification_data_convertToJSON() failed [nf_profile]");
|
||||
goto end;
|
||||
}
|
||||
cJSON_AddItemToObject(item, "nfProfile", nf_profile_local_JSON);
|
||||
if (item->child == NULL) {
|
||||
ogs_error("OpenAPI_notification_data_convertToJSON() failed [nf_profile]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
if (notification_data->profile_changes) {
|
||||
cJSON *profile_changesList = cJSON_AddArrayToObject(item, "profileChanges");
|
||||
if (profile_changesList == NULL) {
|
||||
ogs_error("OpenAPI_notification_data_convertToJSON() failed [profile_changes]");
|
||||
goto end;
|
||||
}
|
||||
cJSON *profile_changesList = cJSON_AddArrayToObject(item, "profileChanges");
|
||||
if (profile_changesList == NULL) {
|
||||
ogs_error("OpenAPI_notification_data_convertToJSON() failed [profile_changes]");
|
||||
goto end;
|
||||
}
|
||||
|
||||
OpenAPI_lnode_t *profile_changes_node;
|
||||
if (notification_data->profile_changes) {
|
||||
OpenAPI_list_for_each(notification_data->profile_changes, profile_changes_node) {
|
||||
cJSON *itemLocal = OpenAPI_change_item_convertToJSON(profile_changes_node->data);
|
||||
if (itemLocal == NULL) {
|
||||
ogs_error("OpenAPI_notification_data_convertToJSON() failed [profile_changes]");
|
||||
goto end;
|
||||
}
|
||||
cJSON_AddItemToArray(profile_changesList, itemLocal);
|
||||
OpenAPI_lnode_t *profile_changes_node;
|
||||
if (notification_data->profile_changes) {
|
||||
OpenAPI_list_for_each(notification_data->profile_changes, profile_changes_node) {
|
||||
cJSON *itemLocal = OpenAPI_change_item_convertToJSON(profile_changes_node->data);
|
||||
if (itemLocal == NULL) {
|
||||
ogs_error("OpenAPI_notification_data_convertToJSON() failed [profile_changes]");
|
||||
goto end;
|
||||
}
|
||||
cJSON_AddItemToArray(profile_changesList, itemLocal);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (notification_data->condition_event) {
|
||||
if (cJSON_AddStringToObject(item, "conditionEvent", OpenAPI_condition_event_type_ToString(notification_data->condition_event)) == NULL) {
|
||||
ogs_error("OpenAPI_notification_data_convertToJSON() failed [condition_event]");
|
||||
goto end;
|
||||
}
|
||||
if (cJSON_AddStringToObject(item, "conditionEvent", OpenAPI_condition_event_type_ToString(notification_data->condition_event)) == NULL) {
|
||||
ogs_error("OpenAPI_notification_data_convertToJSON() failed [condition_event]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
end:
|
||||
|
|
@ -114,7 +114,7 @@ OpenAPI_notification_data_t *OpenAPI_notification_data_parseFromJSON(cJSON *noti
|
|||
}
|
||||
|
||||
OpenAPI_notification_event_type_e eventVariable;
|
||||
|
||||
|
||||
if (!cJSON_IsString(event)) {
|
||||
ogs_error("OpenAPI_notification_data_parseFromJSON() failed [event]");
|
||||
goto end;
|
||||
|
|
@ -127,7 +127,7 @@ OpenAPI_notification_data_t *OpenAPI_notification_data_parseFromJSON(cJSON *noti
|
|||
goto end;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (!cJSON_IsString(nf_instance_uri)) {
|
||||
ogs_error("OpenAPI_notification_data_parseFromJSON() failed [nf_instance_uri]");
|
||||
goto end;
|
||||
|
|
@ -136,43 +136,43 @@ OpenAPI_notification_data_t *OpenAPI_notification_data_parseFromJSON(cJSON *noti
|
|||
cJSON *nf_profile = cJSON_GetObjectItemCaseSensitive(notification_dataJSON, "nfProfile");
|
||||
|
||||
OpenAPI_nf_profile_t *nf_profile_local_nonprim = NULL;
|
||||
if (nf_profile) {
|
||||
nf_profile_local_nonprim = OpenAPI_nf_profile_parseFromJSON(nf_profile);
|
||||
}
|
||||
if (nf_profile) {
|
||||
nf_profile_local_nonprim = OpenAPI_nf_profile_parseFromJSON(nf_profile);
|
||||
}
|
||||
|
||||
cJSON *profile_changes = cJSON_GetObjectItemCaseSensitive(notification_dataJSON, "profileChanges");
|
||||
|
||||
OpenAPI_list_t *profile_changesList;
|
||||
if (profile_changes) {
|
||||
cJSON *profile_changes_local_nonprimitive;
|
||||
if (!cJSON_IsArray(profile_changes)) {
|
||||
if (profile_changes) {
|
||||
cJSON *profile_changes_local_nonprimitive;
|
||||
if (!cJSON_IsArray(profile_changes)){
|
||||
ogs_error("OpenAPI_notification_data_parseFromJSON() failed [profile_changes]");
|
||||
goto end;
|
||||
}
|
||||
|
||||
profile_changesList = OpenAPI_list_create();
|
||||
|
||||
cJSON_ArrayForEach(profile_changes_local_nonprimitive, profile_changes ) {
|
||||
if (!cJSON_IsObject(profile_changes_local_nonprimitive)) {
|
||||
ogs_error("OpenAPI_notification_data_parseFromJSON() failed [profile_changes]");
|
||||
goto end;
|
||||
}
|
||||
OpenAPI_change_item_t *profile_changesItem = OpenAPI_change_item_parseFromJSON(profile_changes_local_nonprimitive);
|
||||
|
||||
profile_changesList = OpenAPI_list_create();
|
||||
|
||||
cJSON_ArrayForEach(profile_changes_local_nonprimitive, profile_changes ) {
|
||||
if (!cJSON_IsObject(profile_changes_local_nonprimitive)) {
|
||||
ogs_error("OpenAPI_notification_data_parseFromJSON() failed [profile_changes]");
|
||||
goto end;
|
||||
}
|
||||
OpenAPI_change_item_t *profile_changesItem = OpenAPI_change_item_parseFromJSON(profile_changes_local_nonprimitive);
|
||||
|
||||
OpenAPI_list_add(profile_changesList, profile_changesItem);
|
||||
}
|
||||
OpenAPI_list_add(profile_changesList, profile_changesItem);
|
||||
}
|
||||
}
|
||||
|
||||
cJSON *condition_event = cJSON_GetObjectItemCaseSensitive(notification_dataJSON, "conditionEvent");
|
||||
|
||||
OpenAPI_condition_event_type_e condition_eventVariable;
|
||||
if (condition_event) {
|
||||
if (!cJSON_IsString(condition_event)) {
|
||||
ogs_error("OpenAPI_notification_data_parseFromJSON() failed [condition_event]");
|
||||
goto end;
|
||||
}
|
||||
condition_eventVariable = OpenAPI_condition_event_type_FromString(condition_event->valuestring);
|
||||
if (condition_event) {
|
||||
if (!cJSON_IsString(condition_event)) {
|
||||
ogs_error("OpenAPI_notification_data_parseFromJSON() failed [condition_event]");
|
||||
goto end;
|
||||
}
|
||||
condition_eventVariable = OpenAPI_condition_event_type_FromString(condition_event->valuestring);
|
||||
}
|
||||
|
||||
notification_data_local_var = OpenAPI_notification_data_create (
|
||||
eventVariable,
|
||||
|
|
@ -180,7 +180,7 @@ OpenAPI_notification_data_t *OpenAPI_notification_data_parseFromJSON(cJSON *noti
|
|||
nf_profile ? nf_profile_local_nonprim : NULL,
|
||||
profile_changes ? profile_changesList : NULL,
|
||||
condition_event ? condition_eventVariable : 0
|
||||
);
|
||||
);
|
||||
|
||||
return notification_data_local_var;
|
||||
end:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue