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_traffic_descriptor_t *OpenAPI_traffic_descriptor_create(
|
|||
char *dnn,
|
||||
OpenAPI_snssai_t *s_nssai,
|
||||
OpenAPI_list_t *ddd_traffic_descriptor_list
|
||||
)
|
||||
)
|
||||
{
|
||||
OpenAPI_traffic_descriptor_t *traffic_descriptor_local_var = OpenAPI_malloc(sizeof(OpenAPI_traffic_descriptor_t));
|
||||
if (!traffic_descriptor_local_var) {
|
||||
|
|
@ -47,44 +47,44 @@ cJSON *OpenAPI_traffic_descriptor_convertToJSON(OpenAPI_traffic_descriptor_t *tr
|
|||
|
||||
item = cJSON_CreateObject();
|
||||
if (traffic_descriptor->dnn) {
|
||||
if (cJSON_AddStringToObject(item, "dnn", traffic_descriptor->dnn) == NULL) {
|
||||
ogs_error("OpenAPI_traffic_descriptor_convertToJSON() failed [dnn]");
|
||||
goto end;
|
||||
}
|
||||
if (cJSON_AddStringToObject(item, "dnn", traffic_descriptor->dnn) == NULL) {
|
||||
ogs_error("OpenAPI_traffic_descriptor_convertToJSON() failed [dnn]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
if (traffic_descriptor->s_nssai) {
|
||||
cJSON *s_nssai_local_JSON = OpenAPI_snssai_convertToJSON(traffic_descriptor->s_nssai);
|
||||
if (s_nssai_local_JSON == NULL) {
|
||||
ogs_error("OpenAPI_traffic_descriptor_convertToJSON() failed [s_nssai]");
|
||||
goto end;
|
||||
}
|
||||
cJSON_AddItemToObject(item, "sNssai", s_nssai_local_JSON);
|
||||
if (item->child == NULL) {
|
||||
ogs_error("OpenAPI_traffic_descriptor_convertToJSON() failed [s_nssai]");
|
||||
goto end;
|
||||
}
|
||||
cJSON *s_nssai_local_JSON = OpenAPI_snssai_convertToJSON(traffic_descriptor->s_nssai);
|
||||
if (s_nssai_local_JSON == NULL) {
|
||||
ogs_error("OpenAPI_traffic_descriptor_convertToJSON() failed [s_nssai]");
|
||||
goto end;
|
||||
}
|
||||
cJSON_AddItemToObject(item, "sNssai", s_nssai_local_JSON);
|
||||
if (item->child == NULL) {
|
||||
ogs_error("OpenAPI_traffic_descriptor_convertToJSON() failed [s_nssai]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
if (traffic_descriptor->ddd_traffic_descriptor_list) {
|
||||
cJSON *ddd_traffic_descriptor_listList = cJSON_AddArrayToObject(item, "dddTrafficDescriptorList");
|
||||
if (ddd_traffic_descriptor_listList == NULL) {
|
||||
ogs_error("OpenAPI_traffic_descriptor_convertToJSON() failed [ddd_traffic_descriptor_list]");
|
||||
goto end;
|
||||
}
|
||||
cJSON *ddd_traffic_descriptor_listList = cJSON_AddArrayToObject(item, "dddTrafficDescriptorList");
|
||||
if (ddd_traffic_descriptor_listList == NULL) {
|
||||
ogs_error("OpenAPI_traffic_descriptor_convertToJSON() failed [ddd_traffic_descriptor_list]");
|
||||
goto end;
|
||||
}
|
||||
|
||||
OpenAPI_lnode_t *ddd_traffic_descriptor_list_node;
|
||||
if (traffic_descriptor->ddd_traffic_descriptor_list) {
|
||||
OpenAPI_list_for_each(traffic_descriptor->ddd_traffic_descriptor_list, ddd_traffic_descriptor_list_node) {
|
||||
cJSON *itemLocal = OpenAPI_ddd_traffic_descriptor_convertToJSON(ddd_traffic_descriptor_list_node->data);
|
||||
if (itemLocal == NULL) {
|
||||
ogs_error("OpenAPI_traffic_descriptor_convertToJSON() failed [ddd_traffic_descriptor_list]");
|
||||
goto end;
|
||||
}
|
||||
cJSON_AddItemToArray(ddd_traffic_descriptor_listList, itemLocal);
|
||||
OpenAPI_lnode_t *ddd_traffic_descriptor_list_node;
|
||||
if (traffic_descriptor->ddd_traffic_descriptor_list) {
|
||||
OpenAPI_list_for_each(traffic_descriptor->ddd_traffic_descriptor_list, ddd_traffic_descriptor_list_node) {
|
||||
cJSON *itemLocal = OpenAPI_ddd_traffic_descriptor_convertToJSON(ddd_traffic_descriptor_list_node->data);
|
||||
if (itemLocal == NULL) {
|
||||
ogs_error("OpenAPI_traffic_descriptor_convertToJSON() failed [ddd_traffic_descriptor_list]");
|
||||
goto end;
|
||||
}
|
||||
cJSON_AddItemToArray(ddd_traffic_descriptor_listList, itemLocal);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
end:
|
||||
return item;
|
||||
|
|
@ -95,48 +95,48 @@ OpenAPI_traffic_descriptor_t *OpenAPI_traffic_descriptor_parseFromJSON(cJSON *tr
|
|||
OpenAPI_traffic_descriptor_t *traffic_descriptor_local_var = NULL;
|
||||
cJSON *dnn = cJSON_GetObjectItemCaseSensitive(traffic_descriptorJSON, "dnn");
|
||||
|
||||
if (dnn) {
|
||||
if (!cJSON_IsString(dnn)) {
|
||||
ogs_error("OpenAPI_traffic_descriptor_parseFromJSON() failed [dnn]");
|
||||
goto end;
|
||||
}
|
||||
if (dnn) {
|
||||
if (!cJSON_IsString(dnn)) {
|
||||
ogs_error("OpenAPI_traffic_descriptor_parseFromJSON() failed [dnn]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
cJSON *s_nssai = cJSON_GetObjectItemCaseSensitive(traffic_descriptorJSON, "sNssai");
|
||||
|
||||
OpenAPI_snssai_t *s_nssai_local_nonprim = NULL;
|
||||
if (s_nssai) {
|
||||
s_nssai_local_nonprim = OpenAPI_snssai_parseFromJSON(s_nssai);
|
||||
}
|
||||
if (s_nssai) {
|
||||
s_nssai_local_nonprim = OpenAPI_snssai_parseFromJSON(s_nssai);
|
||||
}
|
||||
|
||||
cJSON *ddd_traffic_descriptor_list = cJSON_GetObjectItemCaseSensitive(traffic_descriptorJSON, "dddTrafficDescriptorList");
|
||||
|
||||
OpenAPI_list_t *ddd_traffic_descriptor_listList;
|
||||
if (ddd_traffic_descriptor_list) {
|
||||
cJSON *ddd_traffic_descriptor_list_local_nonprimitive;
|
||||
if (!cJSON_IsArray(ddd_traffic_descriptor_list)) {
|
||||
if (ddd_traffic_descriptor_list) {
|
||||
cJSON *ddd_traffic_descriptor_list_local_nonprimitive;
|
||||
if (!cJSON_IsArray(ddd_traffic_descriptor_list)){
|
||||
ogs_error("OpenAPI_traffic_descriptor_parseFromJSON() failed [ddd_traffic_descriptor_list]");
|
||||
goto end;
|
||||
}
|
||||
|
||||
ddd_traffic_descriptor_listList = OpenAPI_list_create();
|
||||
|
||||
cJSON_ArrayForEach(ddd_traffic_descriptor_list_local_nonprimitive, ddd_traffic_descriptor_list ) {
|
||||
if (!cJSON_IsObject(ddd_traffic_descriptor_list_local_nonprimitive)) {
|
||||
ogs_error("OpenAPI_traffic_descriptor_parseFromJSON() failed [ddd_traffic_descriptor_list]");
|
||||
goto end;
|
||||
}
|
||||
OpenAPI_ddd_traffic_descriptor_t *ddd_traffic_descriptor_listItem = OpenAPI_ddd_traffic_descriptor_parseFromJSON(ddd_traffic_descriptor_list_local_nonprimitive);
|
||||
|
||||
ddd_traffic_descriptor_listList = OpenAPI_list_create();
|
||||
|
||||
cJSON_ArrayForEach(ddd_traffic_descriptor_list_local_nonprimitive, ddd_traffic_descriptor_list ) {
|
||||
if (!cJSON_IsObject(ddd_traffic_descriptor_list_local_nonprimitive)) {
|
||||
ogs_error("OpenAPI_traffic_descriptor_parseFromJSON() failed [ddd_traffic_descriptor_list]");
|
||||
goto end;
|
||||
}
|
||||
OpenAPI_ddd_traffic_descriptor_t *ddd_traffic_descriptor_listItem = OpenAPI_ddd_traffic_descriptor_parseFromJSON(ddd_traffic_descriptor_list_local_nonprimitive);
|
||||
|
||||
OpenAPI_list_add(ddd_traffic_descriptor_listList, ddd_traffic_descriptor_listItem);
|
||||
}
|
||||
OpenAPI_list_add(ddd_traffic_descriptor_listList, ddd_traffic_descriptor_listItem);
|
||||
}
|
||||
}
|
||||
|
||||
traffic_descriptor_local_var = OpenAPI_traffic_descriptor_create (
|
||||
dnn ? ogs_strdup_or_assert(dnn->valuestring) : NULL,
|
||||
s_nssai ? s_nssai_local_nonprim : NULL,
|
||||
ddd_traffic_descriptor_list ? ddd_traffic_descriptor_listList : NULL
|
||||
);
|
||||
);
|
||||
|
||||
return traffic_descriptor_local_var;
|
||||
end:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue