mirror of
https://github.com/open5gs/open5gs.git
synced 2026-05-02 13:20:08 +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,8 +7,9 @@
|
|||
OpenAPI_dnn_route_selection_descriptor_t *OpenAPI_dnn_route_selection_descriptor_create(
|
||||
char *dnn,
|
||||
OpenAPI_list_t *ssc_modes,
|
||||
OpenAPI_list_t *pdu_sess_types
|
||||
)
|
||||
OpenAPI_list_t *pdu_sess_types,
|
||||
int atsss_info
|
||||
)
|
||||
{
|
||||
OpenAPI_dnn_route_selection_descriptor_t *dnn_route_selection_descriptor_local_var = OpenAPI_malloc(sizeof(OpenAPI_dnn_route_selection_descriptor_t));
|
||||
if (!dnn_route_selection_descriptor_local_var) {
|
||||
|
|
@ -17,6 +18,7 @@ OpenAPI_dnn_route_selection_descriptor_t *OpenAPI_dnn_route_selection_descriptor
|
|||
dnn_route_selection_descriptor_local_var->dnn = dnn;
|
||||
dnn_route_selection_descriptor_local_var->ssc_modes = ssc_modes;
|
||||
dnn_route_selection_descriptor_local_var->pdu_sess_types = pdu_sess_types;
|
||||
dnn_route_selection_descriptor_local_var->atsss_info = atsss_info;
|
||||
|
||||
return dnn_route_selection_descriptor_local_var;
|
||||
}
|
||||
|
|
@ -49,33 +51,40 @@ cJSON *OpenAPI_dnn_route_selection_descriptor_convertToJSON(OpenAPI_dnn_route_se
|
|||
}
|
||||
|
||||
if (dnn_route_selection_descriptor->ssc_modes) {
|
||||
cJSON *ssc_modes = cJSON_AddArrayToObject(item, "sscModes");
|
||||
if (ssc_modes == NULL) {
|
||||
cJSON *ssc_modes = cJSON_AddArrayToObject(item, "sscModes");
|
||||
if (ssc_modes == NULL) {
|
||||
ogs_error("OpenAPI_dnn_route_selection_descriptor_convertToJSON() failed [ssc_modes]");
|
||||
goto end;
|
||||
}
|
||||
OpenAPI_lnode_t *ssc_modes_node;
|
||||
OpenAPI_list_for_each(dnn_route_selection_descriptor->ssc_modes, ssc_modes_node) {
|
||||
if (cJSON_AddStringToObject(ssc_modes, "", OpenAPI_ssc_mode_ToString((intptr_t)ssc_modes_node->data)) == NULL) {
|
||||
ogs_error("OpenAPI_dnn_route_selection_descriptor_convertToJSON() failed [ssc_modes]");
|
||||
goto end;
|
||||
}
|
||||
OpenAPI_lnode_t *ssc_modes_node;
|
||||
OpenAPI_list_for_each(dnn_route_selection_descriptor->ssc_modes, ssc_modes_node) {
|
||||
if (cJSON_AddStringToObject(ssc_modes, "", OpenAPI_ssc_mode_ToString((intptr_t)ssc_modes_node->data)) == NULL) {
|
||||
ogs_error("OpenAPI_dnn_route_selection_descriptor_convertToJSON() failed [ssc_modes]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (dnn_route_selection_descriptor->pdu_sess_types) {
|
||||
cJSON *pdu_sess_types = cJSON_AddArrayToObject(item, "pduSessTypes");
|
||||
if (pdu_sess_types == NULL) {
|
||||
cJSON *pdu_sess_types = cJSON_AddArrayToObject(item, "pduSessTypes");
|
||||
if (pdu_sess_types == NULL) {
|
||||
ogs_error("OpenAPI_dnn_route_selection_descriptor_convertToJSON() failed [pdu_sess_types]");
|
||||
goto end;
|
||||
}
|
||||
OpenAPI_lnode_t *pdu_sess_types_node;
|
||||
OpenAPI_list_for_each(dnn_route_selection_descriptor->pdu_sess_types, pdu_sess_types_node) {
|
||||
if (cJSON_AddStringToObject(pdu_sess_types, "", OpenAPI_pdu_session_type_ToString((intptr_t)pdu_sess_types_node->data)) == NULL) {
|
||||
ogs_error("OpenAPI_dnn_route_selection_descriptor_convertToJSON() failed [pdu_sess_types]");
|
||||
goto end;
|
||||
}
|
||||
OpenAPI_lnode_t *pdu_sess_types_node;
|
||||
OpenAPI_list_for_each(dnn_route_selection_descriptor->pdu_sess_types, pdu_sess_types_node) {
|
||||
if (cJSON_AddStringToObject(pdu_sess_types, "", OpenAPI_pdu_session_type_ToString((intptr_t)pdu_sess_types_node->data)) == NULL) {
|
||||
ogs_error("OpenAPI_dnn_route_selection_descriptor_convertToJSON() failed [pdu_sess_types]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (dnn_route_selection_descriptor->atsss_info) {
|
||||
if (cJSON_AddBoolToObject(item, "atsssInfo", dnn_route_selection_descriptor->atsss_info) == NULL) {
|
||||
ogs_error("OpenAPI_dnn_route_selection_descriptor_convertToJSON() failed [atsss_info]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
end:
|
||||
|
|
@ -91,7 +100,7 @@ OpenAPI_dnn_route_selection_descriptor_t *OpenAPI_dnn_route_selection_descriptor
|
|||
goto end;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (!cJSON_IsString(dnn)) {
|
||||
ogs_error("OpenAPI_dnn_route_selection_descriptor_parseFromJSON() failed [dnn]");
|
||||
goto end;
|
||||
|
|
@ -100,52 +109,62 @@ OpenAPI_dnn_route_selection_descriptor_t *OpenAPI_dnn_route_selection_descriptor
|
|||
cJSON *ssc_modes = cJSON_GetObjectItemCaseSensitive(dnn_route_selection_descriptorJSON, "sscModes");
|
||||
|
||||
OpenAPI_list_t *ssc_modesList;
|
||||
if (ssc_modes) {
|
||||
cJSON *ssc_modes_local_nonprimitive;
|
||||
if (!cJSON_IsArray(ssc_modes)) {
|
||||
if (ssc_modes) {
|
||||
cJSON *ssc_modes_local_nonprimitive;
|
||||
if (!cJSON_IsArray(ssc_modes)) {
|
||||
ogs_error("OpenAPI_dnn_route_selection_descriptor_parseFromJSON() failed [ssc_modes]");
|
||||
goto end;
|
||||
}
|
||||
|
||||
ssc_modesList = OpenAPI_list_create();
|
||||
|
||||
cJSON_ArrayForEach(ssc_modes_local_nonprimitive, ssc_modes ) {
|
||||
if (!cJSON_IsString(ssc_modes_local_nonprimitive)){
|
||||
ogs_error("OpenAPI_dnn_route_selection_descriptor_parseFromJSON() failed [ssc_modes]");
|
||||
goto end;
|
||||
}
|
||||
|
||||
ssc_modesList = OpenAPI_list_create();
|
||||
|
||||
cJSON_ArrayForEach(ssc_modes_local_nonprimitive, ssc_modes ) {
|
||||
if (!cJSON_IsString(ssc_modes_local_nonprimitive)) {
|
||||
ogs_error("OpenAPI_dnn_route_selection_descriptor_parseFromJSON() failed [ssc_modes]");
|
||||
goto end;
|
||||
}
|
||||
|
||||
OpenAPI_list_add(ssc_modesList, (void *)OpenAPI_ssc_mode_FromString(ssc_modes_local_nonprimitive->valuestring));
|
||||
}
|
||||
OpenAPI_list_add(ssc_modesList, (void *)OpenAPI_ssc_mode_FromString(ssc_modes_local_nonprimitive->valuestring));
|
||||
}
|
||||
}
|
||||
|
||||
cJSON *pdu_sess_types = cJSON_GetObjectItemCaseSensitive(dnn_route_selection_descriptorJSON, "pduSessTypes");
|
||||
|
||||
OpenAPI_list_t *pdu_sess_typesList;
|
||||
if (pdu_sess_types) {
|
||||
cJSON *pdu_sess_types_local_nonprimitive;
|
||||
if (!cJSON_IsArray(pdu_sess_types)) {
|
||||
if (pdu_sess_types) {
|
||||
cJSON *pdu_sess_types_local_nonprimitive;
|
||||
if (!cJSON_IsArray(pdu_sess_types)) {
|
||||
ogs_error("OpenAPI_dnn_route_selection_descriptor_parseFromJSON() failed [pdu_sess_types]");
|
||||
goto end;
|
||||
}
|
||||
|
||||
pdu_sess_typesList = OpenAPI_list_create();
|
||||
|
||||
cJSON_ArrayForEach(pdu_sess_types_local_nonprimitive, pdu_sess_types ) {
|
||||
if (!cJSON_IsString(pdu_sess_types_local_nonprimitive)){
|
||||
ogs_error("OpenAPI_dnn_route_selection_descriptor_parseFromJSON() failed [pdu_sess_types]");
|
||||
goto end;
|
||||
}
|
||||
|
||||
pdu_sess_typesList = OpenAPI_list_create();
|
||||
|
||||
cJSON_ArrayForEach(pdu_sess_types_local_nonprimitive, pdu_sess_types ) {
|
||||
if (!cJSON_IsString(pdu_sess_types_local_nonprimitive)) {
|
||||
ogs_error("OpenAPI_dnn_route_selection_descriptor_parseFromJSON() failed [pdu_sess_types]");
|
||||
goto end;
|
||||
}
|
||||
|
||||
OpenAPI_list_add(pdu_sess_typesList, (void *)OpenAPI_pdu_session_type_FromString(pdu_sess_types_local_nonprimitive->valuestring));
|
||||
}
|
||||
OpenAPI_list_add(pdu_sess_typesList, (void *)OpenAPI_pdu_session_type_FromString(pdu_sess_types_local_nonprimitive->valuestring));
|
||||
}
|
||||
}
|
||||
|
||||
cJSON *atsss_info = cJSON_GetObjectItemCaseSensitive(dnn_route_selection_descriptorJSON, "atsssInfo");
|
||||
|
||||
if (atsss_info) {
|
||||
if (!cJSON_IsBool(atsss_info)) {
|
||||
ogs_error("OpenAPI_dnn_route_selection_descriptor_parseFromJSON() failed [atsss_info]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
dnn_route_selection_descriptor_local_var = OpenAPI_dnn_route_selection_descriptor_create (
|
||||
ogs_strdup_or_assert(dnn->valuestring),
|
||||
ssc_modes ? ssc_modesList : NULL,
|
||||
pdu_sess_types ? pdu_sess_typesList : NULL
|
||||
);
|
||||
pdu_sess_types ? pdu_sess_typesList : NULL,
|
||||
atsss_info ? atsss_info->valueint : 0
|
||||
);
|
||||
|
||||
return dnn_route_selection_descriptor_local_var;
|
||||
end:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue