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
|
|
@ -8,7 +8,7 @@ OpenAPI_acc_net_ch_id_t *OpenAPI_acc_net_ch_id_create(
|
|||
int acc_net_cha_id_value,
|
||||
OpenAPI_list_t *ref_pcc_rule_ids,
|
||||
int session_ch_scope
|
||||
)
|
||||
)
|
||||
{
|
||||
OpenAPI_acc_net_ch_id_t *acc_net_ch_id_local_var = OpenAPI_malloc(sizeof(OpenAPI_acc_net_ch_id_t));
|
||||
if (!acc_net_ch_id_local_var) {
|
||||
|
|
@ -50,26 +50,26 @@ cJSON *OpenAPI_acc_net_ch_id_convertToJSON(OpenAPI_acc_net_ch_id_t *acc_net_ch_i
|
|||
}
|
||||
|
||||
if (acc_net_ch_id->ref_pcc_rule_ids) {
|
||||
cJSON *ref_pcc_rule_ids = cJSON_AddArrayToObject(item, "refPccRuleIds");
|
||||
if (ref_pcc_rule_ids == NULL) {
|
||||
ogs_error("OpenAPI_acc_net_ch_id_convertToJSON() failed [ref_pcc_rule_ids]");
|
||||
goto end;
|
||||
}
|
||||
cJSON *ref_pcc_rule_ids = cJSON_AddArrayToObject(item, "refPccRuleIds");
|
||||
if (ref_pcc_rule_ids == NULL) {
|
||||
ogs_error("OpenAPI_acc_net_ch_id_convertToJSON() failed [ref_pcc_rule_ids]");
|
||||
goto end;
|
||||
}
|
||||
|
||||
OpenAPI_lnode_t *ref_pcc_rule_ids_node;
|
||||
OpenAPI_list_for_each(acc_net_ch_id->ref_pcc_rule_ids, ref_pcc_rule_ids_node) {
|
||||
if (cJSON_AddStringToObject(ref_pcc_rule_ids, "", (char*)ref_pcc_rule_ids_node->data) == NULL) {
|
||||
ogs_error("OpenAPI_acc_net_ch_id_convertToJSON() failed [ref_pcc_rule_ids]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
OpenAPI_lnode_t *ref_pcc_rule_ids_node;
|
||||
OpenAPI_list_for_each(acc_net_ch_id->ref_pcc_rule_ids, ref_pcc_rule_ids_node) {
|
||||
if (cJSON_AddStringToObject(ref_pcc_rule_ids, "", (char*)ref_pcc_rule_ids_node->data) == NULL) {
|
||||
ogs_error("OpenAPI_acc_net_ch_id_convertToJSON() failed [ref_pcc_rule_ids]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (acc_net_ch_id->session_ch_scope) {
|
||||
if (cJSON_AddBoolToObject(item, "sessionChScope", acc_net_ch_id->session_ch_scope) == NULL) {
|
||||
ogs_error("OpenAPI_acc_net_ch_id_convertToJSON() failed [session_ch_scope]");
|
||||
goto end;
|
||||
}
|
||||
if (cJSON_AddBoolToObject(item, "sessionChScope", acc_net_ch_id->session_ch_scope) == NULL) {
|
||||
ogs_error("OpenAPI_acc_net_ch_id_convertToJSON() failed [session_ch_scope]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
end:
|
||||
|
|
@ -85,7 +85,7 @@ OpenAPI_acc_net_ch_id_t *OpenAPI_acc_net_ch_id_parseFromJSON(cJSON *acc_net_ch_i
|
|||
goto end;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (!cJSON_IsNumber(acc_net_cha_id_value)) {
|
||||
ogs_error("OpenAPI_acc_net_ch_id_parseFromJSON() failed [acc_net_cha_id_value]");
|
||||
goto end;
|
||||
|
|
@ -94,37 +94,37 @@ OpenAPI_acc_net_ch_id_t *OpenAPI_acc_net_ch_id_parseFromJSON(cJSON *acc_net_ch_i
|
|||
cJSON *ref_pcc_rule_ids = cJSON_GetObjectItemCaseSensitive(acc_net_ch_idJSON, "refPccRuleIds");
|
||||
|
||||
OpenAPI_list_t *ref_pcc_rule_idsList;
|
||||
if (ref_pcc_rule_ids) {
|
||||
cJSON *ref_pcc_rule_ids_local;
|
||||
if (!cJSON_IsArray(ref_pcc_rule_ids)) {
|
||||
ogs_error("OpenAPI_acc_net_ch_id_parseFromJSON() failed [ref_pcc_rule_ids]");
|
||||
goto end;
|
||||
}
|
||||
ref_pcc_rule_idsList = OpenAPI_list_create();
|
||||
|
||||
cJSON_ArrayForEach(ref_pcc_rule_ids_local, ref_pcc_rule_ids) {
|
||||
if (!cJSON_IsString(ref_pcc_rule_ids_local)) {
|
||||
ogs_error("OpenAPI_acc_net_ch_id_parseFromJSON() failed [ref_pcc_rule_ids]");
|
||||
goto end;
|
||||
}
|
||||
OpenAPI_list_add(ref_pcc_rule_idsList, ogs_strdup_or_assert(ref_pcc_rule_ids_local->valuestring));
|
||||
}
|
||||
if (ref_pcc_rule_ids) {
|
||||
cJSON *ref_pcc_rule_ids_local;
|
||||
if (!cJSON_IsArray(ref_pcc_rule_ids)) {
|
||||
ogs_error("OpenAPI_acc_net_ch_id_parseFromJSON() failed [ref_pcc_rule_ids]");
|
||||
goto end;
|
||||
}
|
||||
ref_pcc_rule_idsList = OpenAPI_list_create();
|
||||
|
||||
cJSON_ArrayForEach(ref_pcc_rule_ids_local, ref_pcc_rule_ids) {
|
||||
if (!cJSON_IsString(ref_pcc_rule_ids_local)) {
|
||||
ogs_error("OpenAPI_acc_net_ch_id_parseFromJSON() failed [ref_pcc_rule_ids]");
|
||||
goto end;
|
||||
}
|
||||
OpenAPI_list_add(ref_pcc_rule_idsList , ogs_strdup_or_assert(ref_pcc_rule_ids_local->valuestring));
|
||||
}
|
||||
}
|
||||
|
||||
cJSON *session_ch_scope = cJSON_GetObjectItemCaseSensitive(acc_net_ch_idJSON, "sessionChScope");
|
||||
|
||||
if (session_ch_scope) {
|
||||
if (!cJSON_IsBool(session_ch_scope)) {
|
||||
ogs_error("OpenAPI_acc_net_ch_id_parseFromJSON() failed [session_ch_scope]");
|
||||
goto end;
|
||||
}
|
||||
if (session_ch_scope) {
|
||||
if (!cJSON_IsBool(session_ch_scope)) {
|
||||
ogs_error("OpenAPI_acc_net_ch_id_parseFromJSON() failed [session_ch_scope]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
acc_net_ch_id_local_var = OpenAPI_acc_net_ch_id_create (
|
||||
acc_net_cha_id_value->valuedouble,
|
||||
ref_pcc_rule_ids ? ref_pcc_rule_idsList : NULL,
|
||||
session_ch_scope ? session_ch_scope->valueint : 0
|
||||
);
|
||||
);
|
||||
|
||||
return acc_net_ch_id_local_var;
|
||||
end:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue